How to combine 3 pdf’s into single pdf in suitelet script 2.0?

This is suitelet script which generates n different pdf’s for n work orders. Now instead of printing different pdf’s for each work order data, I want to print single pdf and show different work order data on different pdf page on the same single pdf.

Solution

Essentially with a set you will want each pdf data to be between <PDF>tags and the complete set of <PDF>’s to be inside the <PDFSET>

Probably best creating the outer PDFSET string, appending each PDF and then closing out the PDFSET.

<pdfset>

  <pdf src="resource/coverpdf.pdf" />

  <pdf>
    <body>
      Document body here
    </body>
  </pdf>

  <pdf>
    <body>
      Document trailer here
    </body>
  </pdf>

</pdfset>

Leave a comment

Your email address will not be published. Required fields are marked *