Registry / other / fop
library2.11javamavenunverified

Apache FOP (Formatting Objects Processor) is a print formatter driven by XSL Formatting Objects (XSL-FO) and an output independent formatter.

<dependency> <groupId>org.apache.xmlgraphics</groupId> <artifactId>fop</artifactId> <version>2.11</version> </dependency>
INSTALL
IMPORT
SIG · FOP
F
fop
otherjavav2.11
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

FopFactory
org.apache.fop.apps.FopFactory

Converts an XSL-FO file to PDF using Apache FOP.

import org.apache.fop.apps.FopFactory; import org.apache.fop.apps.Fop; import javax.xml.transform.TransformerFactory; import javax.xml.transform.Transformer; import javax.xml.transform.Source; import javax.xml.transform.Result; import javax.xml.transform.stream.StreamSource; import javax.xml.transform.sax.SAXResult; import java.io.File; import java.io.FileOutputStream; FopFactory fopFactory = FopFactory.newInstance(new File(".").toURI()); Fop fop = fopFactory.newFop("application/pdf", new FileOutputStream("output.pdf")); TransformerFactory factory = TransformerFactory.newInstance(); Transformer transformer = factory.newTransformer(new StreamSource(new File("input.fo"))); Source src = new StreamSource(new File("input.fo")); Result res = new SAXResult(fop.getDefaultHandler()); transformer.transform(src, res);
Debug
Known issues
gotchaFOP 2.x has limited support for certain XSL-FO features like SVG and tables; complex layouts may require workarounds.
fix
Check the FOP compliance page and consider using alternative formatters for advanced features.
affects: >=2.0, <3.0
Upgrade
Version history
2.11latest on Maven
Audit
Dependencies

No dependency data recorded yet.

Agent activity
5 hits · last 30 days
node
4
Resources
fop — mvn dependency:get fop · libregistry