PDF Merger PeopleCode in PeopleSoft

PDF Merger PeopleCode in PeopleSoft

This Peoplecode will be used to merge 2 or More PDF's into a single Output PDF.


import PSXP_ENGINE:PDFMerger;

Local PSXP_ENGINE:PDFMerger &oMerger = create PSXP_ENGINE:PDFMerger();
        
&asNames = CreateArray(&sPdfFile1);
&asNames.POP();

/* Server Location / Local location for File1 */
&File1 = "/app/psoft/Input_File/File1.pdf";
&File2 = "/app/psoft/Input_File/File2.pdf";

&asNames.Push(&File1);
&asNames.Push(&File2);

&sOutputPDFFile = "/app/psoft/Output_File/OutputFile.pdf";

&bResult = &oMerger.mergePDFs(&asNames, &sOutputPDFFile, &sErr);

if  &bResult output is 0, then PDF's are successfully merged.


No comments:

Post a Comment