NetSuite merge PDF in SuiteScript 2.0 [in-progress]-CarlZeng

An example below shows the how PDF files are being merged using tag. For compiled PDF files to be merged, use the src property of pdf.

var xmlF = ‘

’;
xmlF += ‘’;

xmlF += ‘‘;
xmlF = xmlF.replace(/&(?!amp;)/g, ‘&’);
var file = render.xmlToPdf({ xmlString: xmlF });
file.save();

Sample2:

var arrayWithUrls = [“/core/media/media.nl?id=theid&c=myaccoutn&h=1122&_xt=.pdf”, “/core/media/media.nl?id=theid&c=myaccount&h=2233&_xt=.pdf”] var xml = “\n\n” xml += ““ xml += “\n<body font-size=\“12\“>\n

Merged PDF

\n” xml += “

“ xml += “Document body” xml += “\n“ arrayWithUrls.map(function (x) { var cleanPdfURL = mxml.escape({
xmlText: x
});
xml += ‘‘ })
xml += ““

 https://medium.com/@morrisdev/append-multiple-pdf-documents-in-netsuite-suitescripts-6542396a2343

个性化需求沟通 扫客服加V加群: