test.pdf (126.6 KB)
failed.pdf (1.1 MB)
Hi,
We have a bit trouble passing a PDF/A validation with file created by aspose.pdf. It works fine if we use Adobe reader PRO to convert PDF to PDF/A. Hope you can give us a hand on how to solve this issue.
Code used:
Document doc = new Document(filePath);
doc.Convert(new MemoryStream(), PdfFormat.PDF_A_2B, ConvertErrorAction.Delete);
doc.Save(filePath);
Attached file test.pdf is the original PDF
Attached file failed.pdf is PDF/A created by aspose.pdf. When validating the file we get the following error:
Invalid hexadecimal character at position 114682
We use the newest version of aspose.pdf
Thanks!
@nexcom.as,
How you are validating failed.pdf file, please share all validation steps. Please also validate this output PDF document Output.pdf (1.2 MB), and then let us know how that goes into your environment.
validator.zip (162.7 KB)
Hi Imran,
Thanks for reply. Our client has a validator (attached validator.zip). Our PDF/A must pass the validation.
You can run it in CMD: Java -jar signvalidator.jar
Sample:
java -jar signvalidator.jar Output.pdf
@nexcom.as,
Please verify conformance with Adobe Preflight, it will resolve the issue. We follow Adobe Preflight for validating PDF/A conformance because all other tools on the market have their own “representation” of PDF/A conformance.
Hi Imran,
Our client is a government security firm, we must strictly follow the standards they have set. Can you somehow figure out why we get:
Invalid hexadecimal character at position 114682
When using aspose.pdf, but not adobe reader?
Thanks so much for your time.
@nexcom.as,
We managed to replicate the said error in our environment. An investigation has been logged under the ticket ID PDFNET-44815 in our bug tracking system. We have linked your post to this ticket and will keep you informed regarding any available update. Besides this, please share a bit more details about the validator. Is it an open source PDF validator? It would be great, if you can share its source code.
Hi Imran,
We do not have source code access for the validator, but it is possible to decompile .jar file into java code by using: http://www.javadecompilers.com/
“Invalid hexadecimal character” error throw happens in this file: signvalidator_source_from_jdcore/dk/danid/javascript/signtextvalidator/_/ft.java
Hope it helps.
@nexcom.as,
Thank you for the details. We have recorded this information under the same ticket ID PDFNET-44815, and will let you know once a significant progress has been made in this regard.
@nexcom.as
The problem doesn’t seem connected to Aspose.PDF, the document is converted to PDF/A-2b succesfully, and both Adobe Acrobat Preflight and veraPDF validator confirm its PDF/A conformance (see the Attached File).
It seems, there is a problem in the provided Java validation package. Unfortunately, We were unable to debug its decompiled version due to an ancient Java version it’s built against. So, if problem is still valid for you, try to ask the Java package vendor either to fix the problem on their side or to provide the detailed information, what exactly in the documents makes their package to throw an exception, so that we could assess feasibility of a fix on our side.
Also, please note that we were unable to convert the document to PDF/A using Adobe Acrobat Pro, and while the Java validator threw no exception on the converted file indeed, it also failed validation - so it’s hard to tell whether fully conformant PDF/A document created with Acrobat would pass the validator successfully.