function readOnly(count){ }
Starting November 20, the site will be set to read-only. On December 4, 2023,
forum discussions will move to the Trailblazer Community.
+ Start a Discussion
S@kh!S@kh! 

Getting Invalid PDF issue

There is a PDF stored on the quote object, we have access to it via a blob object on the quote. We wanted to check if there was some special sauce to extracting the blob?

Simply decoding it (base64decode) and saving it to disk, doesnt come out as a PDF, so was wondering if there was some special handling around serializing a blob to a PDF

 

I am directly getting the Blob contents from Document field value of QuoteDocument object. This is base64encoded contents. and sending to Docusign REST API call for attaching PDF document to envelope but in response i am getting exception saying "The file header %PDF cannot be found. Must appear somewhere within the first 1024 bytes of the file". Do i need to convert this encoding before sending or am i missing something here?