pdfbox-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF subversion and git services (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (PDFBOX-4513) FDFAnnotationStamp fails to parse some appearance streams
Date Sat, 13 Apr 2019 11:22:00 GMT

    [ https://issues.apache.org/jira/browse/PDFBOX-4513?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16816909#comment-16816909
] 

ASF subversion and git services commented on PDFBOX-4513:
---------------------------------------------------------

Commit 1857469 from Tilman Hausherr in branch 'pdfbox/branches/2.0'
[ https://svn.apache.org/r1857469 ]

PDFBOX-4513: SonarQube fix

> FDFAnnotationStamp fails to parse some appearance streams
> ---------------------------------------------------------
>
>                 Key: PDFBOX-4513
>                 URL: https://issues.apache.org/jira/browse/PDFBOX-4513
>             Project: PDFBox
>          Issue Type: Bug
>          Components: PDModel
>    Affects Versions: 2.0.15
>         Environment: OpenJDK 1.8.0_201-2-redhat, Microsoft Windows 10
>            Reporter: Kai Keggenhoff
>            Priority: Minor
>              Labels: xfdf
>             Fix For: 2.0.16, 3.0.0 PDFBox
>
>         Attachments: bad_stamp-2.0.15.xfdf, bad_stamp2-2.0.15.xfdf
>
>
> Some stamps still cause issues in 2.0.15 when their appearance streams are parsed.
> I attached two XFDF files which produces this error when I merge it :
> Apr 12, 2019 7:46:34 AM org.apache.pdfbox.util.Hex decodeHex
> SCHWERWIEGEND: Can't parse
> 0, aborting decode
> java.lang.NumberFormatException: For input string: "
> 0"
> at java.lang.NumberFormatException.forInputString(NumberFormatException.java:65)
> at java.lang.Integer.parseInt(Integer.java:569)
> at org.apache.pdfbox.util.Hex.decodeHex(Hex.java:279)
> at org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp.parseStreamElement(FDFAnnotationStamp.java:253)
> at org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp.parseStampAnnotationAppearanceXML(FDFAnnotationStamp.java:175)
> at org.apache.pdfbox.pdmodel.fdf.FDFAnnotationStamp.<init>(FDFAnnotationStamp.java:134)
> at org.apache.pdfbox.pdmodel.fdf.FDFDictionary.<init>(FDFDictionary.java:211)
> at org.apache.pdfbox.pdmodel.fdf.FDFCatalog.<init>(FDFCatalog.java:63)
> at org.apache.pdfbox.pdmodel.fdf.FDFDocument.<init>(FDFDocument.java:90)
>  
> it looks like the attribute value contains a LF/CR. When this error occurs, the appearance
is missing and only the outline of the stamp is shown when the user selects the element.
> I found two of the default stamps in Adobe Reader (german version) to cause this
> - SBNotForPublicRelease ("Nicht zur Veröffentlichung", bad-stamp-2.0.15.xfdf)
> - SBPreliminaryResults ("Vorläufige Ergebnisse", bad-stamp2-2.0.15.xfdf)
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org


Mime
View raw message