https://netsuiteprofessionals.com logo
#suitescript
Title
# suitescript
a

alien4u

04/12/2022, 8:58 PM
@AB Yes, you need to store them in the file cabinet, make them available without login and them you can merge them with pdf set
a

AB

04/12/2022, 9:00 PM
Hi @alien4u, below is my code, var renderer = render.create(); renderer.addRecord('record',record.load({ type: record.Type.VENDOR_PAYMENT, id: recInternalId }) ); renderer.setTemplateByScriptId('CUSTTMPL_344_4506264_527'); var pdfFile = renderer.renderAsPdf(); context.response.writeFile(pdfFile,true); How do I upload a PDF template? can you please provide some codes or links?
a

alien4u

04/12/2022, 9:02 PM
You want to merge PDF templates or files? If you want to merge PDF templates what would be the final intention of that?
a

AB

04/12/2022, 9:06 PM
I want to merge the PDF template. Just like the standard PrintCheque form does, Please check the PDF template
@alien4u If someone selects two transaction records on the PrintCheque form, it will concate the PDF template and show in a new tab after the "Print" button clicking
@alien4u I am designing the custom PrintCheque same like standard one using SuiteScript
a

alien4u

04/12/2022, 9:12 PM
Those are not two templates merged, those are two PDFs merged, re-creating that print queue is not an easy task and you would run out of governance when you try to print to many PDFs… this require some architecture/design and it not easy it is a complex problem to solve…
As for merging PDF the steps would be: • create each PDF. • Save then and make the files available without login. • Merge them into a final PDF with pdf set…
a

AB

04/12/2022, 9:17 PM
@alien4u Okay, do you have any sample code to merge PDFs?? Please share with me
w

wbermudo

04/13/2022, 4:55 AM
To add, you can also choose not to save the PDF in file cabinet to use the pdfset tag. <pdfset> <pdf> </pdf> <pdf> </pdf> </pdfset> ^ can also do the trick.
a

AB

04/13/2022, 8:35 AM
@wbermudo thank you