[英]c# PDF file concatenation
Does anyone know of a good way to load PDF files from an external resource and contatenate them together to produce a single PDF document. 有没有人知道从外部资源加载PDF文件并将它们连接在一起以生成单个PDF文档的好方法。
Is there some component you can receomend? 是否有一些你可以收到的组件?
我会用PDFSharp: http ://pdfsharp.com/PDFsharp/index.php?option = com_content&task = view&id = 52&Itemid = 45
This doesn't use C#, but the way I typically do this is to use ghostscript: 这不使用C#,但我通常这样做的方法是使用ghostscript:
gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=out.pdf in1.pdf in2.pdf in3.pdf ... gs -q -sPAPERSIZE = letter -dNOPAUSE -dBATCH -sDEVICE = pdfwrite -sOutputFile = out.pdf in1.pdf in2.pdf in3.pdf ...
Basically, this prints out several pdfs in sequence, but redirects the output to a output pdf, effectively concatenating them. 基本上,这会按顺序打印出几个pdf,但会将输出重定向到输出pdf,从而有效地连接它们。
Check out this explanation: http://ansuz.sooke.bc.ca/software/pdf-append.php 看看这个解释: http : //ansuz.sooke.bc.ca/software/pdf-append.php
Disclaimer: I work at Atalasoft. 免责声明:我在Atalasoft工作。 Our DotImage Document Imaging SDK can do this.
我们的DotImage Document Imaging SDK可以做到这一点。 Here's a whitepaper with all of the code you need .
这是一份包含您需要的所有代码的白皮书 。
It's simply: 它很简单:
PdfDocument.Combine("FinalReport.pdf", "CoverSheet.pdf";,
"Disclaimer.pdf", "Report.pdf");
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.