ahmed saeed moawoad elmasry
10/23/2023, 12:09 PMvar myFile = render.create();
myFile.templateContent = invoicePdf;
myFile.addRecord('record', record.load({
type: record.Type.INVOICE,
id: invId
}));
var InvoicePDF = myFile.renderAsPdf();
InvoicePDF.name = "INV" + invId + ".pdf";
InvoicePDF.folder = 7448;
var fileId = InvoicePDF.save();
var savedPdf = file.load({
id: fileId
})
var invicePdfContent = savedPdf.getContents()
I've tried encoding it to UTF-8 using the encode.convert function, but it results in a blank page. code: var decodedString = encode.convert({
string: base64String,
inputEncoding: encode.Encoding.BASE_64,
outputEncoding: encode.Encoding.UTF_8
});
battk
10/23/2023, 2:50 PMbattk
10/23/2023, 2:50 PMbattk
10/23/2023, 2:51 PMFerdsp
10/25/2023, 2:01 PM