Combining two PDF files in C++

只谈情不闲聊 提交于 2019-12-04 18:03:04
Troy Howard

Try PoDoFo

http://podofo.sourceforge.net/

You should be able to open both of the PDFs as PDFMemDocuments using PDFMemDocument.Load( filename ).

Then, acquire references to the two pages you want to copy and add to the end of the document using InsertPages, or optionally, remove all but the last two pages of the source document, then call PDFDocument.

Append and pass the called document. Hard to say which would be faster or more stable.

Hope that helps, Troy

You can use the Ghostscript utility pdf2ps to convert the PDF files to PostScript, append the PostScript files, and then convert them back to a PDF using ps2pdf.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!