PDFMerger Class Method

In this section, the PDFMerger class method is presented.


MergePDFs(PDFFileArray, PDFOutputFile, Error)


Use the MergePDFs method to merge the specified PDF files into a single output file.

The order of the files specified in the array are the order in which the files are merged.


Field or Control



Specify an already instantiated and populated array of string containing the names of the PDF files that you want to merge together.


Specify the full path name of the file you want populated with the merged PDF file.

Forward or back slashes are used in the path according to the operating system of the application server or process scheduler server. That is, on Unix servers, the directory separator is a forward slash, while a Windows server returns a path with back slashes.


If any errors occur during processing, this parameter is populated with the text of the error message after processing.


A Boolean: true if the method completed successfully, false otherwise. If this method returns false, the Error parameter is populated with the text of the error message that occurred.


Local PSXP_ENGINE:PDFMerger &oMerger;

&sErr = "";
&asNames = CreateArray(&sPdfFile1);
&bResult = &oMerger.mergePDFs(&asNames, &sOutputPdfFile, &sErr);