Fehler in pdfbox

Published on: 11/03/2011
Discussion

Das angehängte PDF/A, das laut Adobe Preflight keine Fehler enthält, kann nicht textuell signiert werden:
java.lang.NullPointerException: null
at org.pdfbox.util.PDFStreamEngine.showString(PDFStreamEngine.java:374) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at org.pdfbox.util.operator.ShowTextGlyph.process(ShowTextGlyph.java:90) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:494) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at at.knowcenter.wag.egov.egiz.pdf.PDFPage.processOperator(PDFPage.java:96) ~[pdf-as-3.2.jar:na]
at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:207) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at at.knowcenter.wag.egov.egiz.pdf.PDFPage$MyInvoke.process(PDFPage.java:272) ~[pdf-as-3.2.jar:na]
at org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:494) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at at.knowcenter.wag.egov.egiz.pdf.PDFPage.processOperator(PDFPage.java:96) ~[pdf-as-3.2.jar:na]
at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:207) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at org.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:160) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1]
at at.knowcenter.wag.egov.egiz.pdf.PDFUtilities.calculatePageLength(PDFUtilities.java:136) ~[pdf-as-3.2.jar:na]
at at.knowcenter.wag.egov.egiz.pdf.PDFUtilities.calculatePageLength(PDFUtilities.java:81) ~[pdf-as-3.2.jar:na]
at at.knowcenter.wag.egov.egiz.pdf.PDFUtilities.calculatePageLength(PDFUtilities.java:62) ~[pdf-as-3.2.jar:na]
at at.knowcenter.wag.egov.egiz.PdfAS.adjustSignatureTableandCalculatePosition(PdfAS.java:1386) ~[pdf-as-3.2.jar:na]
at at.knowcenter.wag.egov.egiz.PdfAS.determineTablePositioning(PdfAS.java:1284) ~[pdf-as-3.2.jar:na]
at at.gv.egiz.pdfas.impl.signator.binary.BinarySignator_1_0_0.prepareSign(BinarySignator_1_0_0.java:153) ~[pdf-as-3.2.jar:na]
at at.gv.egiz.pdfas.impl.api.PdfAsObject.prepareSign(PdfAsObject.java:719) ~[pdf-as-3.2.jar:na]
at at.gv.egiz.pdfas.impl.api.PdfAsObject.sign(PdfAsObject.java:298) ~[pdf-as-3.2.jar:na]

Eine weitere Exception tritt bei der versuchten Extrahierung eines Platzhalters auf:
java.io.IOException: Not implemented
at org.apache.pdfbox.pdmodel.graphics.color.PDCalRGB.createColorModel(PDCalRGB.java:113) ~[pdfbox-0.8.0-incubating.jar:0.8.0-incubating]
at org.apache.pdfbox.pdmodel.graphics.xobject.PDPixelMap.getRGBImage(PDPixelMap.java:154) ~[pdfbox-0.8.0-incubating.jar:0.8.0-incubating]
at at.gv.egiz.pdfas.placeholder.SignaturePlaceholderExtractor.checkImage(SignaturePlaceholderExtractor.java:242) [pdf-as-3.2-RC1.jar:na]
...

Dieser Fehler kann jedoch durch ein Upgrade der pdfbox-0.8-incubating auf pdfbox-1.5.0 behoben werden.



HardwareAll
ProductOSF/1
Operating SystemAll
ComponentOSF/1
VersionOSF/1
Severitynormal
ResolutionOSF/1

Category

Bugs
Attachments

Comments

Anonymous (not verified)
Fri, 11/03/2011 - 11:41

Sowohl die textuelle, als auch die binäre Signatur schlagen fehl. Obiger Stacktrace stammt von einer binären Signatur, nachfolgend ein Stacktrace einer textuellen Signatur: Caused by: java.lang.NullPointerException: null at org.pdfbox.util.PDFStreamEngine.showString(PDFStreamEngine.java:374) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.operator.ShowTextGlyph.process(ShowTextGlyph.java:90) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:494) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:207) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.operator.Invoke.process(Invoke.java:105) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFStreamEngine.processOperator(PDFStreamEngine.java:494) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFStreamEngine.processSubStream(PDFStreamEngine.java:207) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFStreamEngine.processStream(PDFStreamEngine.java:160) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFTextStripper.processPage(PDFTextStripper.java:382) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFTextStripper.processPages(PDFTextStripper.java:284) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFTextStripper.writeText(PDFTextStripper.java:236) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at org.pdfbox.util.PDFTextStripper.getText(PDFTextStripper.java:154) ~[pdfbox-0.7.2-pdfas-1.1.jar:1.1] at at.knowcenter.wag.egov.egiz.pdf.TextualSignature.extractTextTextual(TextualSignature.java:172) ~[pdf-as-3.2.jar:na]

Anonymous (not verified)
Fri, 02/12/2011 - 09:52

The problem still is actual and also can be corrected with updating to pdfbox-1.6.0. It has also to be noticed, that when updating to this version, the verification tool has also to be considered, otherwise the signature can be placed but can not be verified.