Dear fop specialists,

some time ago I used to use fop something like shown below (I hope the formatting stays constant).

Now I was trying to do so with maven, Java-21 and fop 2.9 and failed.

Is there an example program, e.g. on github, how to use fop 2.9, including the pom.xml and the module-info.java?

=====

FopFactoryBuilderbuilder=newFopFactoryBuilder(basePath.toUri())

.setPageHeight("297mm")

.setPageWidth("210mm");

FopFactoryfopFactory=builder.build();

out=newBufferedOutputStream(Files.newOutputStream(r));

Fopfop=fopFactory.newFop(MimeConstants.MIME_PDF,out);

Transformertransformer=TransformerFactory.newInstance().newTransformer();

Sourcesrc=newStreamSource(fo.toFile());

Resultres=newSAXResult(fop.getDefaultHandler());

transformer.transform(src,res);

out.close();

=====

mit freundlichen Grüße, Best Regards

Rolf

Reply via email to