pdfbox-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Esteban R <eru...@hotmail.com>
Subject XMP issue when using fop and shaded jar
Date Thu, 27 Jul 2017 15:49:20 GMT
I'm working in a project which uses both pdfbox and apache fop (https://xmlgraphics.apache.org/fop/)


CreatePDFA (from pdfbox examples) generates different (wrong?) XMP metadata when fop is included
in the shaded jar. Otherwise (i.e.: if a simple jar is generated or if fop is not included,
then metadata is ok). The issue seems to be related to the services provided by fop (more
details below). How can I solve it? Is it ok to exclude the services provided by fop from
the shaded jar?


You can find a sample project here:

<http://www.filedropper.com/tmpxmpissue>http://www.filedropper.com/tmpxmpissue_1


To reproduce you can use try.sh -included in the project- in a cygwin (Windows 10) environment
-should work on linux- or you can:

mvn clean install

java -jar target/tmp_xmp_issue-1.0-SNAPSHOT.jar  out.pdf "Hello world" OpenSans-Regular.ttf
Open out.pdf with PDFDebugger and see the XMPMetadata:
<rdf:li lang="x-default">out.pdf</rdf:li>

If you don't include fop (i.e. use pom.xml.nofop) then you will get:
<rdf:li xml:lang="x-default">out.pdf</rdf:li>^M

The same will happen if you use pom.xml.noservices (which just excludes the services provided
by fop).


I use java version "1.8.0_112" and pdfbox 2.0.7.

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message