开发者

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.

Is there some component you can 开发者_JAVA技巧receomend?


I would use 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:

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.

Check out this explanation: http://ansuz.sooke.bc.ca/software/pdf-append.php


Disclaimer: I work at Atalasoft. Our DotImage Document Imaging SDK can do this. Here's a whitepaper with all of the code you need.

It's simply:

PdfDocument.Combine("FinalReport.pdf", "CoverSheet.pdf";,
                                   "Disclaimer.pdf", "Report.pdf");
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜