Do you own a Debenu Quick PDF Library 12/11/10/9/8/7? Upgrade to Debenu Quick PDF Library 13!

Foxit Quick PDF Library

Frequently Asked Question:

Return to FAQ Index

How to merge PDF files?

Question

This is my sample code:

QP.AddToFileList('List', '1.pdf');
QP.AddToFileList('List', '2.pdf');

QP.MergeFileList('List', '_temp.PDF');
QP.LoadFromFile('_temp.PDF');

DeleteFile('_temp.PDF');
QP.SaveToFile('work.pdf');

This code run successfully. But when I open "work.pdf" file, it contains 1.pdf +1.pdf. I can't find '2.pdf' in work.pdf.

Answer

Double-check each of the PDF files that you're trying to combine to make sure that they are not encrypted. If you open the PDF in Adobe Reader it should say at the top of the application window if it's Secured or not. If one of the files is encrypted then you need to decrypt it before merging.

In addition, try simplifying your code so that it just looks like this:

QP.AddToFileList("FilesToMerge", "sample123.pdf");
QP.AddToFileList("FilesToMerge", "apply_ fingerprint.pdf");
QP.AddToFileList("FilesToMerge", "debenu final tm.pdf");
QP.MergeFileList("FilesToMerge", "merged_file_list.pdf");

There is more information on merging PDF files available here.


© 2015 Debenu & Foxit. All rights reserved. AboutBuyContactBlogNewsletterSupportFAQProduct UpdatesForum