以编程方式打开 PDF 并打印为 PDF C#
我正在开发一个应用程序,在我打开 PDF 并使用 CutePDF 将其打印到另一个 PDF 后,该应用程序能够打开并显示 PDF,但原始文件无法查看。
我正在寻找一种以编程方式打开 PDF 文件并打印到另一个 PDF 文件的方法(不一定使用 CutePDF,只需打印到另一个 PDF 就是所需的功能)。
这将集成到 C# .NET 项目中。有什么建议如何去做吗?
谢谢。
I am developing an application that is able to open and display PDFs after I open them and print them to another PDF using CutePDF, but the originals are not viewable.
I am looking for a way to programmatically open a PDF file, and print to another PDF file (not necessarily using CutePDF, just printing to another PDF is the desired functionality).
This will be integrated into a C# .NET project. Are there any suggestions how to go about doing this?
Thanks.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
您可以使用Office Interop 并生成 PDF,当你说“打印到另一个pdf”时,我想你的意思是只是生成?或者您是说将它们后台打印到 pdf 打印驱动程序,该驱动程序本质上只会创建要保存的 PDF。
You could use Office Interop and generate the PDF, when you say "print to another pdf", I imagine you mean just generate? Or are you saying spool them to a pdf print driver that essentially will just create a PDF to be saved.
使用 iText,它有 Java 和 C# 版本。我已经成功使用Java版本了。我推荐《iText in Action》一书,以帮助您更快地掌握 iText。本书仅讨论 Java API,但我想您将能够从书中学习 iText 的原理,然后找出 C# 版本的细微差别。
Use iText, which is available in Java and C# versions. I have used the Java version successfully. I recommend the iText in Action book to help you get up to speed with iText faster. The book discusses only the Java API, but I imagine you will be able to learn the principles of iText from the book and then figure out the minor differences for the C# version.