打印为pdf [英] printing to pdf
问题描述
现有系统有很多报告.使用免费的pdf打印机,如dopdf或cutepdf,用户可以打开报告,选择pdf打印机,输入文件名并将报告另存为pdf文件.这似乎有点乏味
The existing system has many reports . Using a free pdf printer like dopdf or cutepdf the user can open the report , choose the pdf printer , type in the filename and save the report as a pdf file.This seems a bit tedious
只需单击按钮即可将报告直接另存为 pdf 文件会很好.不幸的是,报告工具组件没有 pdf 导出功能..有没有办法使用第三方组件以编程方式执行此功能.
It would be nice to have the report directly saved as a pdf file just on click of a button. Unfortunately the reporting tool component doesnt have pdf export functionality. . Is there a way to programatically do this function using a third party component.
打印应该是无声的,这样就不会要求用户输入文件名.例如,单击报告 1 将生成一个名为 c:1.pdf 的文件.像这样的东西ActivatePdfPrinter(c:1.pdf);打印报告;关闭PdfPrinter;
The printing should be silent , so that the user is not asked for a filename.Report 1 when clicked will make a file called c:1.pdf for example. something like this ActivatePdfPrinter(c:1.pdf); printreport; ClosePdfPrinter;
或任何其他方法.
我使用 delphi,但如果您建议使用其他编程语言的任何其他工具,那么我可以朝正确的方向进行搜索.
I use delphi but if you suggest any other tools that work in other programming languages then I can search in the right direction.
推荐答案
免费的开源PDFCreator 可以用作虚拟打印机,但也可以通过 COM 使用.默认设置甚至包括 COM 示例.
The free, open source PDFCreator can function as a virtual printer but it's also usable via COM. The default setup even includes COM examples.
您可以在此处查看 SourceForge SVN 存储库中的 COM 示例:http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/
You can check the COM samples in the SourceForge SVN repository right here: http://pdfcreator.svn.sourceforge.net/viewvc/pdfcreator/trunk/COM/
Delphi 和 ActiveX 相处得很好,所以你应该不会遇到太多麻烦.
Delphi and ActiveX get along superbly so you should not have much trouble.
这篇关于打印为pdf的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!