Frequently Asked Question:
How to merge PDF files?
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.
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.