如何使用C#代码以编程方式打印PDF文件 [英] How to Print PDF file Programatically using C# code
问题描述
嗨我有一个PDF文件存储在文件位置....比如C:\\ MyPDFFile.PDF ....
Hi I have a PDF file stored at a file location ....say at C:\\MyPDFFile.PDF....
我想要通过C#代码打印此PDF文件.....我还要显示一个打印对话框,其中包含预先填充了数据库中可用设置的PrinterSettings(打印机名称,纸张尺寸,纸张来源)...
I want to print this PDF file through C# code.....Also i want to show a Print Dialog with PrinterSettings(Printer Name, Paper Size, Paper Sourcertc ) pre-populated with the the setting available in database...
任何人都可以帮忙??? :)
Can anyone help??? :)
提前致谢
Thanks in advance
推荐答案
您需要自动化现有的Acrobat或你自动化FreePDF。这两个解决方案要求必须安装某些软件。
You need either to automate an existing Acrobat or you automate FreePDF. These two solutions requires that certain software must be installed.
否则您可以使用 任何商业组件,如
Gnostice , Foxit ,
iText 。
You may otherwise use any commercial component like Gnostice, Foxit, iText.
这篇关于如何使用C#代码以编程方式打印PDF文件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!