我在寻找一种方式来生成PDF文件,使用标准的PrintDocument和图形(GDI)班的.NET。据我知道,做到这一点的唯一方法是通过打印到PDF打印机
I'm looking for a way to generate PDF files using the standard PrintDocument and Graphics (GDI) classes in .NET. As far as I know, the only way to do that is by printing to a PDF printer.
现在的问题是,一个PDF打印机驱动程序总是请求给他一个文件名,但我需要从我的code控制的文件名。使用像PDFSharp或DynamicPDF一个PDF库是不是一种选择,因为它们都提供了自己的API生成的PDF文件。
The problem is that a PDF printer driver always asks for a filename, but I need to control the filename from my code. Using a PDF library like PDFSharp or DynamicPDF is not an option, because they all provide their own API for generating PDF files.
我需要这个内部应用程序,所以相关性是没有问题的。
I need this for an internal application, so dependencies are not a problem.
我的问题很简单:有没有办法在这样一种方式,文件名可以被指定并不会提示任何用户控制打印机驱动程序(使用Adobe Acrobat,的PDFCreator,...)
My question is simple: is there a way to control a printer driver (Adobe Acrobat, PDFCreator, ...) in such a way that a filename can be specified and the user is not prompted for anything?
做了一些更多的研究,虽然我还没有找到一个完美的解决方案,还有安装PDF打印机驱动程序,其中的一些产品允许你在要产生某种方式来控制文件的名称:
Did some more research, and although I still didn't find a perfect solution, there are a few products that install a PDF printer driver and which allow you in some way to control the name of the file to be generated:
的BullZip PDF打印机 PDFCamp 的PDFCreator (使用COM接口?) BullZIP PDF Printer PDFCamp PDFCreator (using a COM interface?)的BullZip和的PDFCreator是免费的。
Bullzip and PDFCreator are free.
更新:发现了另外一个看起来非常有前途的:
UPDATE: Found another one that looks very promising:
LEADTOOLS ePrint的专业上一篇:Vzeroall零寄存器是否为ymm16到ymm31?寄存器、Vzeroall
下一篇:SimpleCursorAdapter&;的旧构造函数已弃用。真的?函数、SimpleCursorAdapter、amp、已弃用