How do I convert a Base64 String to a PDF file usi...
# suitescript
b
How do I convert a Base64 String to a PDF file using Suitescript 2.0? I need to send the files as email attachments but I receive them as Base64 strings
b
Use <https:/system.netsuite.com/app/help/helpcenter.nl?fid=section_4223861820.html|file.create> to create the file object
binary files like pdf are represented as base64 strings, so just use your base64 string as the contents
b
@battk I tried that but it’s not working. Below is a snippet of my code
b
whats the base64 string
b
@battk below is the base64 string
b
thats mixed contents
the beginning of the string is not base64 im guessing that you are working with an api that expects to be used in a browser context
your string can be used as a url to tell a browser to open the pdf
218 Views