You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@pdfbox.apache.org by "Tilman Hausherr (Jira)" <ji...@apache.org> on 2020/09/25 17:16:00 UTC
[jira] [Reopened] (PDFBOX-4966) PDImageXObject and
XmpParsingException
[ https://issues.apache.org/jira/browse/PDFBOX-4966?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Tilman Hausherr reopened PDFBOX-4966:
-------------------------------------
> PDImageXObject and XmpParsingException
> --------------------------------------
>
> Key: PDFBOX-4966
> URL: https://issues.apache.org/jira/browse/PDFBOX-4966
> Project: PDFBox
> Issue Type: Bug
> Components: Parsing, PDModel, XmpBox
> Affects Versions: 2.0.12, 2.0.13, 2.0.14, 2.0.15, 2.0.16, 2.0.17, 2.0.18, 2.0.19, 2.0.20, 2.0.21
> Environment: Windows 10 (64 Bit), Java 11.0.8, Netbeans 11.2
> Reporter: Robert Fink
> Priority: Major
> Labels: Java11, PDFBox
> Attachments: SampleApplication.java, SampleApplicationReviewed.java
>
>
> The goal is to add Metadata to an image within the PDF document.
> It works with Java 11 till PDFBox 2.0.11.
> It doesn't work with Java 11 from PDFBox 2.0.12 till PDFBox 2.0.21.
> In the method retrieveMetadataOfImage(PDImageXObject imageForContentStream) the XMPMetadata is exported again. When use the DomXmpParser and parsing the InputStream an error occurs.
> The error is about the missing "<" right at the beginning.
> {code:java}
> // Output
> Sep. 25, 2020 11:56:20 VORM. sample.application.SampleApplication retrieveMetadataOfImage
> SCHWERWIEGEND: null
> org.apache.xmpbox.xml.XmpParsingException: Failed to parse
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:125)
> at sample.application.SampleApplication.retrieveMetadataOfImage(SampleApplication.java:112)
> at sample.application.SampleApplication.main(SampleApplication.java:74)
> Caused by: org.xml.sax.SAXParseException; lineNumber: 1; columnNumber: 1; Content ist nicht zulässig in Prolog.
> at java.xml/com.sun.org.apache.xerces.internal.parsers.DOMParser.parse(DOMParser.java:261)
> at java.xml/com.sun.org.apache.xerces.internal.jaxp.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:339)
> at java.xml/javax.xml.parsers.DocumentBuilder.parse(DocumentBuilder.java:122)
> at org.apache.xmpbox.xml.DomXmpParser.parse(DomXmpParser.java:121)
> ... 2 more
> {code}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@pdfbox.apache.org
For additional commands, e-mail: dev-help@pdfbox.apache.org