Another question, have you used any library to convert PDFs to base64 in suitescript.
I can see this, https://www.npmjs.com/package/pdf-to-base64 , but not sure if I can use this in suitescript.
n
NElliott
11/17/2021, 12:24 PM
No, but I'm not sure why you'd want to use that?
If you save the PDF in the fileCabinet you just do getContents() on the file...
s
stalbert
11/17/2021, 2:51 PM
I've done rudimentary tests and confirmed that
pdf-lib
worked in suitescript
c
creece
11/17/2021, 3:46 PM
PDF is automagically base64 converted via N/file.getContets() according to SA: 99116 (What NElliot is saying). There's also N/encode so no external libs should be needed.