EldoS | Feel safer!

Software components for data protection, secure storage and transfer

[Java] PAdES issue when signing heavy PDF file

Posted: 07/29/2015 09:07:04
by Mickaël Bénès (Standard support level)
Joined: 02/26/2013
Posts: 80


While testing my PAdES signing code, I faced an issue when trying to sign heavy PDF files (> 15 MB). The signature performs but then SBB can't open the PDF file to verify the signature.
SecureBlackbox.PDF.EElPDFDocumentError: Invalid document (Bad document catalog)
   at SecureBlackbox.PDF.TElPDFDocument.GetDocumentCatalog(SBPDF.pas:10850)
   at SecureBlackbox.PDF.TElPDFDocument.ExtractPagesInformation(SBPDF.pas:10066)
   at SecureBlackbox.PDF.TElPDFDocument.ExtractFileInformation(SBPDF.pas:8951)
   at SecureBlackbox.PDF.TElPDFDocument.LoadFromStream(SBPDF.pas:8755)
   at SecureBlackbox.PDF.TElPDFDocument.Open(SBPDF.pas:4492)
   at awsoutil.outil.signature.pades.PADES.openPDF(PADES.java:137)
   at awsoutil.outil.signature.pades.VerifSignFile_SignThread.run(VerifSignFile_SignThread.java:131)

Then I opened the file and checked the signature with Adobe Reader, this is the error reported :
The range of values (in bytes) of the signature is not valid.

I tried to correct this by increasing the size of the JVM (-Xmx1024m) but it didn't change anything.

You can download an example file that I've signed here : https://mega.co.nz/#!bA8whYhJ!zJQP38ieJtoLmV2ngvlTBlTOJzQ-48X9oEnPotABi50

Do you have any clue ? Thanks.
Posted: 07/29/2015 09:45:24
by Eugene Mayevski (Team)

Most likely the source file itself has some deviations in its structure, which, after applying the signature, would cause the file to become invalid. You are welcome to do the following:

1) try to sign the file with the sample certificate which we provide in the SecureBlackbox\Extra\Certificates folder.
2) if the file has problems after this, put both the original and signed file somewhere and post the links to the HelpDesk.

Sincerely yours
Eugene Mayevski



Topic viewed 1267 times

Number of guests: 1, registered members: 0, in total hidden: 0


Back to top

As of July 15, 2016 EldoS business operates as a division of /n software, inc. For more information, please read the announcement.

Got it!