[PDF Digital Signature] PDF Header Not found

Forge Component
(3)
Published on 2017-02-14 by Pramod Jain
3 votes
Published on 2017-02-14 by Pramod Jain

Hi, 

When I try to use sign the pdf I get an error message stating that the PDF Header was not found. I tried different pdf´s and certificates but could not fix the problem. Can somebody help?

Attached OML.

Thanks.


Hi Paulo,

I saw your oml , the problem is you are sending key contents in both the parameters . You need to send key binary in one and pdf binary in other .

In PDFBytes you need to send the pdf binaries. I changed it and is working fine for me.


Regards,

Pramod Jain

Hi Paulo,

Please find attached working OML.

Please let me know if it solves your problem.


Regards,

-PJ-

HI Pramod, 

Thanks very much for your help. The project works fine now, however if I try to get the pdf bytes from the UploadWidget component (UploadFile.Content) I get the same error.  What would be the recommended approach on this case?

Solution

Hi Paulo,

the upload widget doesn't work with Ajax Submit , you need to have the button as Submit or you can use any other way to upload the file..there are forge component available to upload file you can use any of them.

Also if it solved your problem , please mark my answer as solution.


Regards,

-PJ-

Solution

Hello Pramod, 

The problem ended up being the pdf´s themselves. Unfortunately it did not work with other PDFs other than yours. I tried several. Please check the pdf attached, I downloaded it from the IText website. Since I will not have control over the pdf´s being uploaded by my client, I am not sure how to procede. It seems that they are missing some meta-data necessary for the processing.

Hi Paulo ,

I just tried to validate your PDF and seems like the pdf is not a valid pdf.

See below link and try to validate by your self.

https://www.pdf-online.com/osa/validate.aspx


Regards,

-PJ-