Re: Fwd: How to use fop with Java 21

Andreas Reichel <[email protected]> Fri, 06 Sep 2024 11:57:29 +0700
Newsgroups gmane.text.xml.fop.user
Organization manticore-projects Co. Ltd.
Message-ID <5bc43bda50f6488689644cb2b4917f9267038ef5.camel@manticore-projects.com>
--=-GbFnI1ZB5Taf4B4ENbfI
Content-Type: text/plain; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

Good Morning Rolf,

please double check your dependencies: I think it's FOP instead of FOP-
CORE.
For me, the following dependencies work with Java21 and I get nice PDFs
out:

// PDF Output
implementation ('org.apache.xmlgraphics:fop:+') {
    exclude group: 'xalan', module: 'xalan'
}
implementation ('org.apache.xmlgraphics:batik-codec:+') {
    exclude group: 'xalan', module: 'xalan'
}

Viel Glueck!
Andreas

On Fri, 2024-09-06 at 05:47 +0200, Rolf Schumacher wrote:
> =20
> Is there some help about fop?
> =20
> -------- Forwarded Message -------- Subject: Re: How to use fop with
> Java 21=20
> Date: Thu, 5 Sep 2024 12:26:09 +0200=20
> From: Csaba N=C3=A1nai <[email protected]>=20
> To: Rolf Schumacher <[email protected]>=20
>=20
>=20
>=20
> Hi, Rolf=20
>=20
>=20
>=20
> Sorry, but i'm not at home in JPMS and Java 21 capabilities.
>=20
> Please send this mail to the list for community help.
>=20
>=20
>=20
>=20
> Best luck
>=20
>=20
>=20
> Rolf Schumacher <[email protected]> ezt =C3=ADrta (id=C5=91pont: 2024. szept=
. 5.,
> Cs, 8:11):
>=20
> >=20
> >=20
> > Thank you for responding Csaba.
> >=20
> > Years ago i did me a utility module, amoung others hosting
> > operations to help with xslt and fop. fop 2.8 was the latest
> > version that worked. Every year I am trying to upgrade to 2.9,
> > hoping that fop can be used seemlessly with JPMS, now Java 21. I
> > did a new trial these days and failed again.
> >=20
> > The pom.xml of the utility module draws the dependencies
> >=20
> >=20
> > <dependency>
> > <groupId>org.apache.xmlgraphics</groupId>
> > <artifactId>fop-core</artifactId>
> > <version>2.9</version>
> > </dependency>
> > <dependency>
> > <groupId>org.apache.xmlgraphics</groupId>
> > <artifactId>xmlgraphics-
> > commons</artifactId>
> > <version>2.9</version>
> > </dependency>
> >=20
> >=20
> > The application which depends ot the util module copies all
> > dependencies to a "lib" folder:
> >=20
> >=20
> > <plugin>
> > <groupId>org.apache.maven.plugins<
> > /groupId>
> > <artifactId>maven-dependency-
> > plugin</artifactId>
> > <version>3.8.0</version>
> > <executions>
> > <execution>
> > <id>copy-
> > dependencies-to-lib</id>
> > <phase>package</ph
> > ase>
> > <goals>
> > <goal>copy
> > -dependencies</goal>
> > </goals>
> > <configuration>
> > <outputDir
> > ectory>target/lib</outputDirectory>
> > <overWrite
> > Releases>false</overWriteReleases>
> > <overWrite
> > Snapshots>true</overWriteSnapshots>
> > </configuration>
> > </execution>
> > </executions>
> > </plugin>
> >=20
> >=20
> >=20
> > If I run the application by=20
> >=20
> >=20
> >=20
> >=20
> > java -p fctr-0.0.1-SNAPSHOT.jar:lib -m
> > eu.ngong.fctr/eu.ngong.fctr.App [1] RoS fctr
> >=20
> >=20
> >=20
> >=20
> > I get the error
> >=20
> >=20
> >=20
> >=20
> > Error occurred during initialization of boot layer
> > java.lang.module.ResolutionException: Modules fop.core and fop.util
> > export package org.apache.fop.util.text to module qdox
> >=20
> >=20
> >=20
> >=20
> > I spend days to manually sort out all the jar files in "lib" folder
> > to warrant that each module can be found only ones. That work
> > finally became successful and the application starts, but fop is
> > missing some classes. If I put the jar files back hosting those
> > classes (lots of work!) I get again the error of doubled packages.
> >=20
> >=20
> >=20
> >=20
> > It would be too much to reduce the application to just isolate the
> > problem. Therefore I am looking for an example with this
> > properties:
> > - Java 21
> >=20
> > - maven
> >=20
> > - fop 2.9
> >=20
> > - generating a PDF from an xslfo file.
> >=20
> > to try to build up from there and find my problem. Or: I just wait
> > another year, stick to non-JPMS fop 2.8.
> >=20
> >=20
> >=20
> >=20
> > BR
> >=20
> > Rolf
> >=20
> > p.s. ChatGPT does not find such an example.
> >=20
> >=20
> >=20
> >=20
> > On 9/4/24 12:34, Csaba N=C3=A1nai wrote:
> >=20
> > >=20
> > > Hi Rolf,=20
> > >=20
> > >=20
> > >=20
> > > Did you have a compiling issue or runtime error?
> > >=20
> > >=20
> > >=20
> > >=20
> > > Please let us know more!
> > >=20
> > > Please send error messages and stack trace, and a minimal
> > > reproducible example!
> > >=20
> > >=20
> > >=20
> > >=20
> > > Best regards, Csaba
> > >=20
> > >=20
> > >=20
> > > Rolf Schumacher <[email protected]> ezt =C3=ADrta (id=C5=91pont: 2024. s=
zept.
> > > 3., K, 18:40):
> > >=20
> > > >=20
> > > > Dear fop specialists,=20
> > > >=20
> > > > some time ago I used to use fop something like shown below (I
> > > > hope the formatting stays constant).
> > > >=20
> > > > Now I was trying to do so with maven, Java-21 and fop 2.9 and
> > > > failed.
> > > >=20
> > > > Is there an example program, e.g. on github, how to use fop
> > > > 2.9, including the pom.xml and the module-info.java?
> > > >=20
> > > > =3D=3D=3D=3D=3D
> > > >=20
> > > >=20
> > > > FopFactoryBuilder builder =3D new
> > > > FopFactoryBuilder(basePath.toUri())
> > > > .setPageHeight("297mm")
> > > > .setPageWidth("210mm");
> > > > FopFactory fopFactory =3D builder.build();
> > > > out =3D new
> > > > BufferedOutputStream(Files.newOutputStream(r));
> > > > Fop fop =3D fopFactory.newFop(MimeConstants.MIME_PDF,
> > > > out);
> > > > Transformer transformer =3D
> > > > TransformerFactory.newInstance().newTransformer();
> > > > Source src =3D new StreamSource(fo.toFile());
> > > > Result res =3D new SAXResult(fop.getDefaultHandler());
> > > > transformer.transform(src, res);
> > > > out.close();
> > > >=20
> > > >=20
> > > > =3D=3D=3D=3D=3D
> > > > mit freundlichen Gr=C3=BC=C3=9Fe, Best Regards
> > > >=20
> > > > Rolf
> > > >=20
> > > >=20
> > > >=20
> > >=20
> > >=20
> > mit freundlichen Gr=C3=BC=C3=9Fe, Best Regards
> >=20
> > Rolf
> >=20
> >=20
> >=20
>=20
> =20


[1] eu.ngong.fctr.App http://eu.ngong.fctr.app/

--=-GbFnI1ZB5Taf4B4ENbfI
Content-Type: text/html; charset="utf-8"
Content-Transfer-Encoding: quoted-printable

<html><head>

   =20
  <style>pre,code,address {
  margin: 0px;
}
h1,h2,h3,h4,h5,h6 {
  margin-top: 0.2em;
  margin-bottom: 0.2em;
}
ol,ul {
  margin-top: 0em;
  margin-bottom: 0em;
}
blockquote {
  margin-top: 0em;
  margin-bottom: 0em;
}
</style></head>
  <body><div>Good Morning Rolf,</div><div><br></div><div>please double chec=
k your dependencies: I think it's FOP instead of FOP-CORE.</div><div>For me=
, the following dependencies work with Java21 and I get nice PDFs out:</div=
><div><br></div><div style=3D"background-color:#1a1b26;color:#a9b1d6"><pre =
style=3D"font-family:'JetBrains Mono',monospace;font-size:9.6pt;"><span sty=
le=3D"color:#5d6791;">// PDF Output<br></span><span style=3D"color:#82aaff;=
">implementation </span><span style=3D"color:#7dcfff;">(</span><span style=
=3D"color:#9dcc65;">'org.apache.xmlgraphics:fop:+'</span><span style=3D"col=
or:#7dcfff;">) </span><span style=3D"color:#9abdf5;font-weight:bold;">{<br>=
</span><span style=3D"color:#9abdf5;font-weight:bold;">    </span><span sty=
le=3D"color:#82aaff;">exclude </span><span style=3D"color:#9dcc65;">group</=
span>: <span style=3D"color:#9dcc65;">'xalan'</span>, <span style=3D"color:=
#9dcc65;">module</span>: <span style=3D"color:#9dcc65;">'xalan'<br></span><=
span style=3D"color:#9abdf5;font-weight:bold;">}<br></span><span style=3D"c=
olor:#82aaff;">implementation </span><span style=3D"color:#7dcfff;">(</span=
><span style=3D"color:#9dcc65;">'org.apache.xmlgraphics:batik-codec:+'</spa=
n><span style=3D"color:#7dcfff;">) </span><span style=3D"color:#9abdf5;font=
-weight:bold;">{<br></span><span style=3D"color:#9abdf5;font-weight:bold;">=
    </span><span style=3D"color:#82aaff;">exclude </span><span style=3D"col=
or:#9dcc65;">group</span>: <span style=3D"color:#9dcc65;">'xalan'</span>, <=
span style=3D"color:#9dcc65;">module</span>: <span style=3D"color:#9dcc65;"=
>'xalan'<br></span><span style=3D"color:#9abdf5;font-weight:bold;">}</span>=
</pre></div><div><br></div><div>Viel Glueck!</div><div>Andreas</div><div><b=
r></div><div>On Fri, 2024-09-06 at 05:47 +0200, Rolf Schumacher wrote:</div=
><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-left:2px #729=
fcf solid;padding-left:1ex"><div> </div><p>Is there some help about fop?</p=
><div> </div><div class=3D"moz-forward-container">-------- Forwarded Messag=
e -------- <table class=3D"moz-email-headers-table" cellspacing=3D"0" cellp=
adding=3D"0" border=3D"0"> <tbody> <tr> <th valign=3D"BASELINE" nowrap=3D"n=
owrap" align=3D"RIGHT">Subject: </th> <td>Re: How to use fop with Java 21</=
td> </tr> <tr> <th valign=3D"BASELINE" nowrap=3D"nowrap" align=3D"RIGHT">Da=
te: </th> <td>Thu, 5 Sep 2024 12:26:09 +0200</td> </tr> <tr> <th valign=3D"=
BASELINE" nowrap=3D"nowrap" align=3D"RIGHT">From: </th> <td>Csaba N=C3=A1na=
i <a class=3D"moz-txt-link-rfc2396E" href=3D"mailto:[email protected]">&lt;=
[email protected]&gt;</a></td> </tr> <tr> <th valign=3D"BASELINE" nowrap=3D=
"nowrap" align=3D"RIGHT">To: </th> <td>Rolf Schumacher <a class=3D"moz-txt-=
link-rfc2396E" href=3D"mailto:[email protected]">&lt;[email protected]&gt;</a></t=
d> </tr> </tbody> </table> <br> <br> <div dir=3D"ltr">Hi, Rolf <div><br> </=
div> <div>Sorry, but i'm not at home in JPMS and Java 21 capabilities.</div=
> <div>Please send this mail to the list for community help.</div> <div><br=
> </div> <div>Best luck</div> </div> <br> <div class=3D"gmail_quote"> <div =
dir=3D"ltr" class=3D"gmail_attr">Rolf Schumacher &lt;<a href=3D"mailto:rolf=
@august.de" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">rolf@a=
ugust.de</a>&gt; ezt =C3=ADrta (id=C5=91pont: 2024. szept. 5., Cs, 8:11):<b=
r> </div> <br><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; border-=
left:2px #729fcf solid;padding-left:1ex"><div> </div><div> <p>Thank you for=
 responding Csaba.</p> <p>Years ago i did me a utility module, amoung other=
s hosting operations to help with xslt and fop. fop 2.8 was the latest vers=
ion that worked. Every year I am trying to upgrade to 2.9, hoping that fop =
can be used seemlessly with JPMS, now Java 21. I did a new trial these days=
 and failed again.</p> <p>The pom.xml of the utility module draws the depen=
dencies</p> <div style=3D"background-color:rgb(47,47,47);padding:0px 0px 0p=
x 2px"> <div style=3D"color:rgb(204,204,204);background-color:rgb(47,47,47)=
;font-family:monospace;font-size:10pt;white-space:pre-wrap"><p style=3D"mar=
gin:0px">		<span style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D=
"color:rgb(86,156,214)">dependency</span><span style=3D"color:rgb(128,128,1=
28)">&gt;</span></p><p style=3D"margin:0px">			<span style=3D"color:rgb(128=
,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">groupId</span><=
span style=3D"color:rgb(128,128,128)">&gt;</span>org.apache.xmlgraphics<spa=
n style=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,=
156,214)">groupId</span><span style=3D"color:rgb(128,128,128)">&gt;</span><=
/p><p style=3D"margin:0px">			<span style=3D"color:rgb(128,128,128)">&lt;</=
span><span style=3D"color:rgb(86,156,214)">artifactId</span><span style=3D"=
color:rgb(128,128,128)">&gt;</span>fop-core<span style=3D"color:rgb(128,128=
,128)">&lt;/</span><span style=3D"color:rgb(86,156,214)">artifactId</span><=
span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0px=
">			<span style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D"color=
:rgb(86,156,214)">version</span><span style=3D"color:rgb(128,128,128)">&gt;=
</span>2.9<span style=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D=
"color:rgb(86,156,214)">version</span><span style=3D"color:rgb(128,128,128)=
">&gt;</span></p>		<span style=3D"color:rgb(128,128,128)">&lt;/</span><span=
 style=3D"color:rgb(86,156,214)">dependency</span><span style=3D"color:rgb(=
128,128,128)">&gt;</span><p style=3D"margin:0px">		<span style=3D"color:rgb=
(128,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">dependency<=
/span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"mar=
gin:0px">			<span style=3D"color:rgb(128,128,128)">&lt;</span><span style=
=3D"color:rgb(86,156,214)">groupId</span><span style=3D"color:rgb(128,128,1=
28)">&gt;</span>org.apache.xmlgraphics<span style=3D"color:rgb(128,128,128)=
">&lt;/</span><span style=3D"color:rgb(86,156,214)">groupId</span><span sty=
le=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0px">			<sp=
an style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,=
156,214)">artifactId</span><span style=3D"color:rgb(128,128,128)">&gt;</spa=
n>xmlgraphics-commons<span style=3D"color:rgb(128,128,128)">&lt;/</span><sp=
an style=3D"color:rgb(86,156,214)">artifactId</span><span style=3D"color:rg=
b(128,128,128)">&gt;</span></p><p style=3D"margin:0px">			<span style=3D"co=
lor:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">vers=
ion</span><span style=3D"color:rgb(128,128,128)">&gt;</span>2.9<span style=
=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,156,214=
)">version</span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p s=
tyle=3D"margin:0px">		<span style=3D"color:rgb(128,128,128)">&lt;/</span><s=
pan style=3D"color:rgb(86,156,214)">dependency</span><span style=3D"color:r=
gb(128,128,128)">&gt;</span></p></div> </div> <p>The application which depe=
nds ot the util module copies all dependencies to a "lib" folder:</p> <div =
style=3D"background-color:rgb(47,47,47);padding:0px 0px 0px 2px"> <div styl=
e=3D"color:rgb(204,204,204);background-color:rgb(47,47,47);font-family:mono=
space;font-size:10pt;white-space:pre-wrap"><p style=3D"margin:0px">			<span=
 style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,15=
6,214)">plugin</span><span style=3D"color:rgb(128,128,128)">&gt;</span></p>=
<p style=3D"margin:0px">				<span style=3D"color:rgb(128,128,128)">&lt;</sp=
an><span style=3D"color:rgb(86,156,214)">groupId</span><span style=3D"color=
:rgb(128,128,128)">&gt;</span>org.apache.maven.plugins<span style=3D"color:=
rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,156,214)">groupId=
</span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"ma=
rgin:0px">				<span style=3D"color:rgb(128,128,128)">&lt;</span><span style=
=3D"color:rgb(86,156,214)">artifactId</span><span style=3D"color:rgb(128,12=
8,128)">&gt;</span>maven-dependency-plugin<span style=3D"color:rgb(128,128,=
128)">&lt;/</span><span style=3D"color:rgb(86,156,214)">artifactId</span><s=
pan style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0px"=
>				<span style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D"color=
:rgb(86,156,214)">version</span><span style=3D"color:rgb(128,128,128)">&gt;=
</span>3.8.0<span style=3D"color:rgb(128,128,128)">&lt;/</span><span style=
=3D"color:rgb(86,156,214)">version</span><span style=3D"color:rgb(128,128,1=
28)">&gt;</span></p><p style=3D"margin:0px">				<span style=3D"color:rgb(12=
8,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">executions</sp=
an><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin=
:0px">					<span style=3D"color:rgb(128,128,128);text-decoration:underline =
wavy rgb(255,0,128)">&lt;</span><span style=3D"color:rgb(86,156,214);text-d=
ecoration:underline wavy rgb(255,0,128)">execution</span><span style=3D"col=
or:rgb(128,128,128);text-decoration:underline wavy rgb(255,0,128)">&gt;</sp=
an></p><p style=3D"margin:0px">						<span style=3D"color:rgb(128,128,128)"=
>&lt;</span><span style=3D"color:rgb(86,156,214)">id</span><span style=3D"c=
olor:rgb(128,128,128)">&gt;</span>copy-dependencies-to-lib<span style=3D"co=
lor:rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,156,214)">id<=
/span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"mar=
gin:0px">						<span style=3D"color:rgb(128,128,128)">&lt;</span><span styl=
e=3D"color:rgb(86,156,214)">phase</span><span style=3D"color:rgb(128,128,12=
8)">&gt;</span>package<span style=3D"color:rgb(128,128,128)">&lt;/</span><s=
pan style=3D"color:rgb(86,156,214)">phase</span><span style=3D"color:rgb(12=
8,128,128)">&gt;</span></p><p style=3D"margin:0px">						<span style=3D"col=
or:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">goals=
</span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"ma=
rgin:0px">							<span style=3D"color:rgb(128,128,128)">&lt;</span><span st=
yle=3D"color:rgb(86,156,214)">goal</span><span style=3D"color:rgb(128,128,1=
28)">&gt;</span>copy-dependencies<span style=3D"color:rgb(128,128,128)">&lt=
;/</span><span style=3D"color:rgb(86,156,214)">goal</span><span style=3D"co=
lor:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0px">						<span st=
yle=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,156,=
214)">goals</span><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p =
style=3D"margin:0px">						<span style=3D"color:rgb(128,128,128)">&lt;</spa=
n><span style=3D"color:rgb(86,156,214)">configuration</span><span style=3D"=
color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0px">							<span=
 style=3D"color:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,15=
6,214)">outputDirectory</span><span style=3D"color:rgb(128,128,128)">&gt;</=
span>target/lib<span style=3D"color:rgb(128,128,128)">&lt;/</span><span sty=
le=3D"color:rgb(86,156,214)">outputDirectory</span><span style=3D"color:rgb=
(128,128,128)">&gt;</span></p><p style=3D"margin:0px">							<span style=3D=
"color:rgb(128,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">o=
verWriteReleases</span><span style=3D"color:rgb(128,128,128)">&gt;</span>fa=
lse<span style=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"color:=
rgb(86,156,214)">overWriteReleases</span><span style=3D"color:rgb(128,128,1=
28)">&gt;</span></p><p style=3D"margin:0px">							<span style=3D"color:rgb=
(128,128,128)">&lt;</span><span style=3D"color:rgb(86,156,214)">overWriteSn=
apshots</span><span style=3D"color:rgb(128,128,128)">&gt;</span>true<span s=
tyle=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"color:rgb(86,156=
,214)">overWriteSnapshots</span><span style=3D"color:rgb(128,128,128)">&gt;=
</span></p><p style=3D"margin:0px">						<span style=3D"color:rgb(128,128,1=
28)">&lt;/</span><span style=3D"color:rgb(86,156,214)">configuration</span>=
<span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0p=
x">					<span style=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"c=
olor:rgb(86,156,214)">execution</span><span style=3D"color:rgb(128,128,128)=
">&gt;</span></p><p style=3D"margin:0px">				<span style=3D"color:rgb(128,1=
28,128)">&lt;/</span><span style=3D"color:rgb(86,156,214)">executions</span=
><span style=3D"color:rgb(128,128,128)">&gt;</span></p><p style=3D"margin:0=
px">			<span style=3D"color:rgb(128,128,128)">&lt;/</span><span style=3D"co=
lor:rgb(86,156,214)">plugin</span><span style=3D"color:rgb(128,128,128)">&g=
t;</span></p><p style=3D"margin:0px">
</p></div> </div> <div>If I run the application by <br> </div> <div><br> </=
div> <div><font face=3D"Monospace" color=3D"#62a0ea">java -p fctr-0.0.1-SNA=
PSHOT.jar:lib -m eu.ngong.fctr/<a href=3D"http://eu.ngong.fctr.App" target=
=3D"_blank" moz-do-not-send=3D"true">eu.ngong.fctr.App</a> RoS fctr</font><=
/div> <div><br> </div> <div>I get the error</div> <div><br> </div> <div><fo=
nt face=3D"Monospace" color=3D"#ed333b">Error occurred during initializatio=
n of boot layer<br> java.lang.module.ResolutionException: Modules fop.core =
and fop.util export package org.apache.fop.util.text to module qdox</font><=
br> </div> <div><br> </div> <div>I spend days to manually sort out all the =
jar files in "lib" folder to warrant that each module can be found only one=
s. That work finally became successful and the application starts, but fop =
is missing some classes. If I put the jar files back hosting those classes =
(lots of work!) I get again the error of doubled packages.</div> <div><br> =
</div> <div>It would be too much to reduce the application to just isolate =
the problem. Therefore I am looking for an example with this properties:<br=
> - Java 21</div> <div>- maven</div> <div>- fop 2.9</div> <div>- generating=
 a PDF from an xslfo file.<br> </div> <div>to try to build up from there an=
d find my problem. Or: I just wait another year, stick to non-JPMS fop 2.8.=
<br> </div> <div><br> </div> <div>BR</div> <div>Rolf</div> <div>p.s. ChatGP=
T does not find such an example.</div> <div><br> </div> <div>On 9/4/24 12:3=
4, Csaba N=C3=A1nai wrote:<br> </div> <br><blockquote type=3D"cite" style=
=3D"margin:0 0 0 .8ex; border-left:2px #729fcf solid;padding-left:1ex"><div=
> </div><div dir=3D"ltr">Hi Rolf, <div><br> </div> <div>Did you have a comp=
iling issue or runtime error?</div> <div><br> </div> <div>Please let us kno=
w more!</div> <div>Please send error messages and stack trace, and a minima=
l reproducible example!</div> <div><br> </div> <div>Best regards, Csaba</di=
v> </div><div> <br> </div><div class=3D"gmail_quote"> <div dir=3D"ltr" clas=
s=3D"gmail_attr">Rolf Schumacher &lt;<a href=3D"mailto:[email protected]" targ=
et=3D"_blank" moz-do-not-send=3D"true" class=3D"moz-txt-link-freetext">rolf=
@august.de</a>&gt; ezt =C3=ADrta (id=C5=91pont: 2024. szept. 3., K, 18:40):=
<br> </div> <br><blockquote type=3D"cite" style=3D"margin:0 0 0 .8ex; borde=
r-left:2px #729fcf solid;padding-left:1ex"><div> </div><div> Dear fop speci=
alists, <div> <p>some time ago I used to use fop something like shown below=
 (I hope the formatting stays constant).<br> </p> <p>Now I was trying to do=
 so with maven, Java-21 and fop 2.9 and failed.</p> <p>Is there an example =
program, e.g. on github, how to use fop 2.9, including the pom.xml and the =
module-info.java?<br> </p> <p>=3D=3D=3D=3D=3D<br> </p> <div style=3D"backgr=
ound-color:rgb(47,47,47);padding:0px 0px 0px 2px"> <div style=3D"color:rgb(=
204,204,204);background-color:rgb(47,47,47);font-family:monospace;font-size=
:10pt;white-space:pre-wrap"><p style=3D"margin:0px"><span style=3D"color:rg=
b(217,232,247)">	</span><span style=3D"color:rgb(18,144,195)">FopFactoryBui=
lder</span><span style=3D"color:rgb(217,232,247)"> </span><span style=3D"co=
lor:rgb(242,242,0)">builder</span><span style=3D"color:rgb(217,232,247)"> <=
/span><span style=3D"color:rgb(230,230,250)">=3D</span><span style=3D"color=
:rgb(217,232,247)"> </span><span style=3D"color:rgb(204,108,29)">new</span>=
<span style=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rgb(167=
,236,33)">FopFactoryBuilder</span><span style=3D"color:rgb(249,250,244)">(<=
/span><span style=3D"color:rgb(121,171,255)">basePath</span><span style=3D"=
color:rgb(230,230,250)">.</span><span style=3D"color:rgb(128,246,167)">toUr=
i</span><span style=3D"color:rgb(249,250,244)">())</span></p><p style=3D"ma=
rgin:0px"><span style=3D"color:rgb(217,232,247)">			</span><span style=3D"c=
olor:rgb(230,230,250)">.</span><span style=3D"color:rgb(167,236,33)">setPag=
eHeight</span><span style=3D"color:rgb(249,250,244)">(</span><span style=3D=
"color:rgb(23,198,163)">"297mm"</span><span style=3D"color:rgb(249,250,244)=
">)</span></p><p style=3D"margin:0px"><span style=3D"color:rgb(217,232,247)=
">			</span><span style=3D"color:rgb(230,230,250)">.</span><span style=3D"c=
olor:rgb(167,236,33)">setPageWidth</span><span style=3D"color:rgb(249,250,2=
44)">(</span><span style=3D"color:rgb(23,198,163)">"210mm"</span><span styl=
e=3D"color:rgb(249,250,244)">)</span><span style=3D"color:rgb(230,230,250)"=
>;</span></p><p style=3D"margin:0px"><span style=3D"color:rgb(217,232,247)"=
>	</span><span style=3D"color:rgb(18,144,195)">FopFactory</span><span style=
=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rgb(242,242,0)">fo=
pFactory</span><span style=3D"color:rgb(217,232,247)"> </span><span style=
=3D"color:rgb(230,230,250)">=3D</span><span style=3D"color:rgb(217,232,247)=
"> </span><span style=3D"color:rgb(243,236,121)">builder</span><span style=
=3D"color:rgb(230,230,250)">.</span><span style=3D"color:rgb(167,236,33)">b=
uild</span><span style=3D"color:rgb(249,250,244)">()</span><span style=3D"c=
olor:rgb(230,230,250)">;</span></p><p style=3D"margin:0px"><span style=3D"c=
olor:rgb(217,232,247)">	</span><span style=3D"color:rgb(243,236,121)">out</=
span><span style=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rg=
b(230,230,250)">=3D</span><span style=3D"color:rgb(217,232,247)"> </span><s=
pan style=3D"color:rgb(204,108,29)">new</span><span style=3D"color:rgb(217,=
232,247)"> </span><span style=3D"color:rgb(167,236,33)">BufferedOutputStrea=
m</span><span style=3D"color:rgb(249,250,244)">(</span><span style=3D"color=
:rgb(18,144,195)">Files</span><span style=3D"color:rgb(230,230,250)">.</spa=
n><span style=3D"color:rgb(150,236,63);font-style:italic">newOutputStream</=
span><span style=3D"color:rgb(249,250,244)">(</span><span style=3D"color:rg=
b(243,236,121)">r</span><span style=3D"color:rgb(249,250,244)">))</span><sp=
an style=3D"color:rgb(230,230,250)">;</span></p><p style=3D"margin:0px"><sp=
an style=3D"color:rgb(217,232,247)">	</span><span style=3D"color:rgb(18,144=
,195)">Fop</span><span style=3D"color:rgb(217,232,247)"> </span><span style=
=3D"color:rgb(242,242,0)">fop</span><span style=3D"color:rgb(217,232,247)">=
 </span><span style=3D"color:rgb(230,230,250)">=3D</span><span style=3D"col=
or:rgb(217,232,247)"> </span><span style=3D"color:rgb(243,236,121)">fopFact=
ory</span><span style=3D"color:rgb(230,230,250)">.</span><span style=3D"col=
or:rgb(167,236,33)">newFop</span><span style=3D"color:rgb(249,250,244)">(</=
span><span style=3D"color:rgb(128,242,246)">MimeConstants</span><span style=
=3D"color:rgb(230,230,250)">.</span><span style=3D"color:rgb(141,218,248);f=
ont-style:italic;font-weight:bold">MIME_PDF</span><span style=3D"color:rgb(=
230,230,250)">,</span><span style=3D"color:rgb(217,232,247)"> </span><span =
style=3D"color:rgb(243,236,121)">out</span><span style=3D"color:rgb(249,250=
,244)">)</span><span style=3D"color:rgb(230,230,250)">;</span></p><p style=
=3D"margin:0px"><span style=3D"color:rgb(217,232,247)">	</span><span style=
=3D"color:rgb(62,171,230)">Transformer</span><span style=3D"color:rgb(217,2=
32,247)"> </span><span style=3D"color:rgb(242,242,0)">transformer</span><sp=
an style=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rgb(230,23=
0,250)">=3D</span><span style=3D"color:rgb(217,232,247)"> </span><span styl=
e=3D"color:rgb(62,171,230)">TransformerFactory</span><span style=3D"color:r=
gb(230,230,250)">.</span><span style=3D"color:rgb(150,236,63);font-style:it=
alic">newInstance</span><span style=3D"color:rgb(249,250,244)">()</span><sp=
an style=3D"color:rgb(230,230,250)">.</span><span style=3D"color:rgb(128,24=
6,167)">newTransformer</span><span style=3D"color:rgb(249,250,244)">()</spa=
n><span style=3D"color:rgb(230,230,250)">;</span></p><p style=3D"margin:0px=
"><span style=3D"color:rgb(217,232,247)">	</span><span style=3D"color:rgb(1=
28,242,246)">Source</span><span style=3D"color:rgb(217,232,247)"> </span><s=
pan style=3D"color:rgb(242,242,0)">src</span><span style=3D"color:rgb(217,2=
32,247)"> </span><span style=3D"color:rgb(230,230,250)">=3D</span><span sty=
le=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rgb(204,108,29)"=
>new</span><span style=3D"color:rgb(217,232,247)"> </span><span style=3D"co=
lor:rgb(167,236,33)">StreamSource</span><span style=3D"color:rgb(249,250,24=
4)">(</span><span style=3D"color:rgb(121,171,255)">fo</span><span style=3D"=
color:rgb(230,230,250)">.</span><span style=3D"color:rgb(167,236,33)">toFil=
e</span><span style=3D"color:rgb(249,250,244)">())</span><span style=3D"col=
or:rgb(230,230,250)">;</span></p><p style=3D"margin:0px"><span style=3D"col=
or:rgb(217,232,247)">	</span><span style=3D"color:rgb(128,242,246)">Result<=
/span><span style=3D"color:rgb(217,232,247)"> </span><span style=3D"color:r=
gb(242,242,0)">res</span><span style=3D"color:rgb(217,232,247)"> </span><sp=
an style=3D"color:rgb(230,230,250)">=3D</span><span style=3D"color:rgb(217,=
232,247)"> </span><span style=3D"color:rgb(204,108,29)">new</span><span sty=
le=3D"color:rgb(217,232,247)"> </span><span style=3D"color:rgb(167,236,33)"=
>SAXResult</span><span style=3D"color:rgb(249,250,244)">(</span><span style=
=3D"color:rgb(243,236,121)">fop</span><span style=3D"color:rgb(230,230,250)=
">.</span><span style=3D"color:rgb(167,236,33)">getDefaultHandler</span><sp=
an style=3D"color:rgb(249,250,244)">())</span><span style=3D"color:rgb(230,=
230,250)">;</span></p><p style=3D"margin:0px"><span style=3D"color:rgb(217,=
232,247)">	</span><span style=3D"color:rgb(243,236,121)">transformer</span>=
<span style=3D"color:rgb(230,230,250)">.</span><span style=3D"color:rgb(128=
,246,167)">transform</span><span style=3D"color:rgb(249,250,244)">(</span><=
span style=3D"color:rgb(243,236,121)">src</span><span style=3D"color:rgb(23=
0,230,250)">,</span><span style=3D"color:rgb(217,232,247)"> </span><span st=
yle=3D"color:rgb(243,236,121)">res</span><span style=3D"color:rgb(249,250,2=
44)">)</span><span style=3D"color:rgb(230,230,250)">;</span></p><p style=3D=
"margin:0px"><span style=3D"color:rgb(217,232,247)">	</span><span style=3D"=
color:rgb(243,236,121)">out</span><span style=3D"color:rgb(230,230,250)">.<=
/span><span style=3D"color:rgb(167,236,33)">close</span><span style=3D"colo=
r:rgb(249,250,244)">()</span><span style=3D"color:rgb(230,230,250)">;</span=
></p></div> </div> <p>=3D=3D=3D=3D=3D</p> <pre cols=3D"72">mit freundlichen=
 Gr=C3=BC=C3=9Fe, Best Regards

Rolf</pre> </div> </div><div> </div><br></blockquote> </div><div> </div></b=
lockquote> <pre cols=3D"72">mit freundlichen Gr=C3=BC=C3=9Fe, Best Regards

Rolf</pre> </div><div> </div><br></blockquote> </div> </div><div> </div></b=
lockquote><div><br></div><div><span></span></div></body></html>

--=-GbFnI1ZB5Taf4B4ENbfI--