Hello Folks,
Greetings for the Day!
First of all thanks in Advance!
I need your help to get solution for converting a PDF file from a Base64 code and the same file I need to attach in posted sales invoice.
I have done the customization for store base64 code in a BLOB field, from where I need to convert it into PDF and the same need to attach in Document Attachment table.
during my investigation I got to know that we have Media type field in document attachment table for which I tried to use Base64 code conversion with BASE64 Convert codeunit with function FromBase64, which was not working out or might be I am missing something, I have used the TempBlob codeunit for doing the same, but the thing is somehow the PDF is loosing the format converted, becasue after attachment when I am getting open the same by downloading PDF file is giving error "Could not load the file format.
Could anyone help me in this regards. basically I wants to know is it possible to convert the Base64 into PDF and the same can be attach in Media type field.
any help will be appreciated. Thanks!
Below is code while attaching the file