hi, guys :slightly_smiling_face: PDF printout advi...
# general
j
hi, guys 🙂 PDF printout advice from any SuiteScript expert, please. have you ever tried to add file name to the file generated by rendered and change Freemarker placeholders in the file's name? something like var pdfFileName = "Picking Slip ${record.trainid} ${record.date}.pdf"; pdfFile = renderer.renderAsPdf(); pdfFile.name = pdfFileName;
b
you can use a second template and use TemplateRenderer.renderAsString
although its more common to just build the filename yourself without the template
j
@battk Thank you for the reply, really 🌹 Do you have any snippet on how to use renderAsString() for the secondtemplate in this case, please?
b
its used the same as renderAsPdf
j
Ok, will try to use the second template. Thank you for the hint :-)