有什么好的 PDF 导出过滤器可以与 Fast Report 配合使用吗?
我最近发现 Fast Report 的 PDF 导出过滤器导出的 PDF 在 Mac OSX、iOS 和 Android 设备中无法正确显示。
Fast Report 告知他们的 pdf 实现仅支持 Windows,他们无法透露他们正在开发的新实现何时可用。
我还尝试使用 Gnostice 导出过滤器,但他们的演示安装程序在 Delphi XE 中不起作用,当我联系他们时,他们花了 15 天才给我发送了一些附加的 dcus,但也不起作用。所以我正在寻找另一种选择。
如果您知道或使用可与 Fast Report 配合使用的 PDF 导出过滤器,请告诉我。
2015 年 11 月:Fast Report 现在支持 PDF/A,启用此选项后,PDF 可以在所有平台上正常运行。
2014 年 10 月 - Fast Report 5 似乎仍然生成“仅限 Windows”的 PDF。鉴于 Fast Report 是与 Delphi 捆绑在一起的报告生成器,针对此问题的生产就绪解决方案将有利于跨平台开发人员。
以下是使用 Fast Report 5 演示生成的新示例,在 Android 4.4 上使用 Adobe Reader 11 显示:
在 Windows 上:
I recently discovered that the PDFs exported by the Fast Report's PDF export filter aren't displayed correctly in Mac OSX, iOS and Android devices.
Fast Report informed that their pdf implementation only support Windows and they can't say when the new implementation that they are working on will be available.
I also tried to use the Gnostice export filter, but their demo installer didn't work in Delphi XE and when I contacted them, they took 15 days to send me some attached dcus which also didn't work. So I'm searching for another option.
If you know or use a PDF export filter which works with Fast Report, please let me know.
November 2015: Fast Report now have PDF/A support, with this option enabled the PDFs are fine on all platforms.
October 2014 - Fast Report 5 still seems to generate "Windows-only" PDF. A production-ready solution for this problem would be a benefit for cross-platform developers, given that Fast Report is the report generator bundled with Delphi.
Here is a fresh example generated with the Fast Report 5 demo, displayed with Adobe Reader 11 on Android 4.4:
And on Windows:
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(6)
我不确定这应该从字面上理解,因为 PDF 应该是一种跨平台格式。这更有可能意味着他们实际上没有时间、设备或专业知识来测试这些平台。我使用的 PDF 导出过滤器是 Fast Report 中内置的过滤器!它肯定有一些错误,但我设法解决了它们。我认为这也可能对您有用:从一个可以正确导出的简单文档开始,开始添加功能直到它停止,然后您知道是什么停止了它,并且您将知道如何解决问题。
根据我的经验,这就是给我带来麻烦的原因:
另请确保在任何给定平台上使用 ADOBE Reader 进行测试。如果它适用于 Adobe 阅读器但不适用于其他阅读器,则第 3 方阅读器可能存在错误!
编辑:这里(链接)是生成的示例 PDF 文档通过我的快速报告应用程序。我不知道你生成了什么类型的文档,但在我的书中,这是一个非常复杂的文档。注意从表格数据结束处开始的对角线,注意嵌入的图像(条形码、印章、签名)。
我在以下移动设备上打开该文档:
关于 PDF 格式:如果文档符合标准,则为“PDF”,这里有一些 Wikipedia相关信息。理论上,无论您以何种方式查看 PDF 文档,其呈现方式都应完全相同,但有些力量可能会阻碍这一点:
I'm not sure that should be taken literally, considering PDF is supposed to be a cross platform format. It more likely means they don't actually have the time, equipment or expertise to test with those platforms. The PDF export filter that I'm using is the one built into Fast Report! It surely has some bugs, but I managed to work around them. And I think that might also work for you: Start with a simple document that does export properly, start adding features until it brakes, then you know what brakes it and you'll know how to work around the problem.
From my experience, here's what got me into trouble:
Also make sure you test using ADOBE Reader, on any of the given platforms. If it works with the Adobe reader but doesn't work with other readers, there might be a bug in the 3rd party reader!
Edit: Here (link) is a sample PDF document generated by my Fast Reports application. I have no idea what kinds of documents you generate, but in my book that's a mighty complex document. Notice the diagonal line that starts where the table data ends, notice the embedded images (bar code, stamp, signature).
I opened that document on the following mobile devices:
About the PDF format: A document is "PDF" if it conforms to the standard, here's some Wikipedia info on that. In theory a PDF document should render exactly the same way any way you look at it, but there are forces at play that might work against this:
据我所知,您可以将快速报告页面导出为图元文件(即矢量 Windows 格式,实际上是 GDI 命令的原始序列化)。
然后,您可以使用我们的开源 SynPDF 库将这些图元文件呈现为 PDF。它适用于 Delphi 5 到 XE,支持 Unicode,可以嵌入 True Type 字体,甚至可以创建 PDF/A 文件。
它还能够将报告中包含的图元文件导出为矢量图片(而不是位图),因此可以大大提高 pdf 质量,同时缩小其大小。
例如,请参阅如何将其用于 QuickReport。 Fast Report 应使用类似的技术。
AFAIK you can export your Fast Report pages as metafiles (i.e. vectorial Windows format, which is in fact a raw serialization of GDI commands).
Then you could be able to render those metafiles into PDF using our Open Source SynPDF library. It works from Delphi 5 up to XE, is Unicode ready, can embed true type fonts, and even create PDF/A files.
It is also able to export metafiles included in reports as vectorial pictures (and not bitmaps), and could therefore highly increase the pdf quality and at the same time shrink its size.
See for instance how it can be used for QuickReport. A similar technical should be used with Fast Report.
Gnostice 支持回复了我的电子邮件,我报告说他们的试用安装程序无法正常工作,并向我发送了一些有关可能出现问题的提示,我能够安装它。
我工作的公司已经为我购买了许可证,并且我已经更换了快速报表导出过滤器,这是一项简单的任务,只需将 2 个组件放在与 frxReport 对象相同的表单上并设置 2 或 3 个属性即可。
此外,以编程方式导出报告也需要 2 行代码,并且可以在常见问题解答中轻松找到该信息。
最后,根据建议并寻找其他选项只是为了找到多年来没有任何更新的废弃组件,Gnostice eDocEngine 是最佳解决方案。
只是希望他们让他们的安装程序更加“程序员友好”,就好像它抱怨搜索路径中缺少快速报告的单位一样,我至少能够了解正在发生的事情,而不仅仅是收到错误并指责他们有一个不起作用的试用安装程序。
更换过滤器并使用 eDocEngine 组件生成 PDF 后,PDF 现在在 iOS、OSX 和 Android 中的工作方式相同。
The Gnostice support answered my e-mail which I reported that their trial installer didn't work and send me some tips about which could be the problem and I was able to install it.
The company I work for already bought me a license and I already replaced the Fast Report Export Filter, which was a task as simple as droping 2 components on the same Form as the frxReport Object and setting 2 or 3 properties.
Also, to export the report programatically was also 2 lines of code and the information was easily found in their FAQ.
In the end, based on the recomendations and after looking for other options just to find abandoned components which doesn't have any updates for years, the Gnostice eDocEngine was the best solution.
Just hope they make their installer a little more "Programmer Friendly" as if it had complained about the lack of Fast Report's units in the search path I would've been able to at least have an idea of what was going on, instead of just getting an error and blaming them for having a trial installer which didn't work.
After replacing the filter and generating the PDF's using the eDocEngine component, the PDFs now work the same in iOS, OSX and Android.
这是我的解决方案。这不是通用的,但对我的情况有帮助。
主要思想:在小文件大小的报告字体中使用(我发现了类似 Arial 的字体,带有西里尔字符集,大小为 57kb)。所以导出的文件可以是100-200 kb。
详细信息在这里:
http://dev-doc .blogspot.com/2013/03/fastreport-4-font-reading-and-huge-file.html
Here is my workaround solution. It's not an universal one, but helped me in my case.
The main idea: use in report font with small file size (I've found Arial-like font with cyrillic charset with size 57kb). So the exported files can be 100-200 kb.
Details is here:
http://dev-doc.blogspot.com/2013/03/fastreport-4-font-reading-and-huge-file.html
我使用 WPcubed 组件中的 wPDF,它确实是一个很棒的产品,物有所值
I use wPDF from WPcubed components, it's really a great product, good value for money
您始终可以安装一台 PDF 打印机。这些实际上是作为 Windows 打印机安装的 PDF 转换器。它们可以在任何应用程序(包括 FastReprt 组件)上工作 - 只需在其上打印即可。
You can always install one of the PDF printers. These are in fact PDF convertors that install as windows printer. They work from any application including FastReprt components - just print on them.