fop uses PDFBox 2.0.4 so that there are 2 concurrent versions to be put into the jar. And obviously the older one "wins"

Andreas

Am 27.07.2017 um 17:49 schrieb Esteban R:
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.



---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@pdfbox.apache.org
For additional commands, e-mail: users-h...@pdfbox.apache.org

Reply via email to