Hi,
We are using aspose-pdf-11.4.0.jar library and we have several problems with differents pdf files.
The problems are the following:
- First problem:
Converting pdf file “test1.pdf” to pdf/a_1b format. We had found that aspose library is inserting a channel count of 4 for a RGB ICC profile.
PDF affected part:
5 0 obj
<</Filter/FlateDecode/N 4/Length 706>>stream…etc
(replacing /N 4 to /N 3 work fine)
Using validator “https://www.pdf-online.com/osa/validate.aspx”:
Validating file “test1.pdf” for conformance level pdfa-1b
The value of the key N is 4 but must be 3.
The document does not conform to the requested standard.
- Second problem:
Converting pdf file “test2.pdf” to pdf/a_1b format.
We had found that
aspose library is doing a bad font size parsing in a FreeText annotation element (attribute /DS)
PDF affected parts:
/DS(font: 10.0pt Courier; color: #000000;)
Exception trace:
java.lang.NumberFormatException: For input string: “pt”
at sun.misc.FloatingDecimal.readJavaFormatString(Unknown Source)
at sun.misc.FloatingDecimal.parseDouble(Unknown Source)
at java.lang.Double.parseDouble(Unknown Source)
at java.lang.Double.valueOf(Unknown Source)
at com.aspose.pdf.TextStyle.(Unknown Source)
at com.aspose.pdf.FreeTextAnnotation.getTextStyle(Unknown Source)
at com.aspose.pdf.FreeTextAnnotation.m1(Unknown Source)
at com.aspose.pdf.Page.m1(Unknown Source)
at com.aspose.pdf.Page.m2(Unknown Source)
at com.aspose.pdf.ADocument.m12(Unknown Source)
at com.aspose.pdf.ADocument.flatten(Unknown Source)
at com.aspose.pdf.Document.flatten(Unknown Source)
at com.aspose.pdf.internal.p93.z6.m2(Unknown Source)
at com.aspose.pdf.internal.p93.z7.m12(Unknown Source)
at com.aspose.pdf.internal.p93.z6.m1(Unknown Source)
at com.aspose.pdf.ADocument.m1(Unknown Source)
at com.aspose.pdf.Document.m1(Unknown Source)
at com.aspose.pdf.ADocument.convert(Unknown Source)
at com.aspose.pdf.Document.convert(Unknown Source)
at Main.main(Main.java:258)
- Third problem:
Converting pdf file “test3.pdf” to pdf/a_1b format. The conversion log file contains:
Acroform is enabled
<</Type/Catalog/AcroForm<</SigFlags 3/Fields[]/DA(/Helv 0 Tf 0 g )>>/Pages 5 0 R/Metadata 46 0 R/OutputIntents[33 0 R]>>
Possible fix:
If fields element is empty not insert AcroForm element. The signature field was removed but the signature appearance exists (I think that this conversion part is correct):
<</Contents 17 0 R/Type/Page/Resources<</ProcSet[/PDF/Text]/Font 7 0 R/XObject<</FRM0 16 0 R>>>>/Parent 5 0 R/Rotate 0/MediaBox[0 0 595 842]>>
(16 0 object reference the signature appearance).