We can decode base 64 code to pdf format using any free decoding link.
Steps to convert base 64 to pdf
- Paste your string in the “Base64” field.
- Press the “Decode Base64 to PDF” button.
- Click on the filename link to download the PDF.
After the conversion, we can store the pdf in to the file cabinet using the below code
var fileObj = file.create({
name: ‘E-invoice’+test+’alogic.pdf’,
fileType: file.Type.PDF,
contents: body,
description: ‘This is a plain text file.’,
encoding: file.Encoding.UTF_8,
folder: 2552124,
isOnline: true
});
var fId=fileObj.save();