AnsweredAssumed Answered

Error "Failed to load PDF document."

Question asked by s.sanjay@ti.com on Feb 7, 2018
Latest reply on Feb 9, 2018 by s.sanjay@ti.com

Hi All ,

 

Requirement : Create a Boomi API to generate a PDF document . And this API will be called from an Angular application link as "Download PDF" button ?

 

Implementation : I have created a Boomi API and the process to generate the PDF , Its a HTTP GET API - based on the input request parameter I will call the process and the process will query the Database to get the content and the disk operator will convert the content into a PDF file . I am using itextpdf to generate the PDF .

 

Error : On requesting the url from the browser I am getting the following error -

Error "Failed to load PDF document." 
Please see the attachment with the error.
Note : I believe I am missing something related to the HTTP Header etc.. while creating the API . Because the process as such can generate the PDF and works good , I have tested this by sending the attachment as an email , but when I call the process using API via HTTP GET operation from the browser it gives me an error. Your help is much appreciated .
An example code will work great .
Thanks ! 

Attachments

Outcomes