Registry / other / fop

fop

JSON →
library2.11javamavenunverified

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

other
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.

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 footguns
gotchaFOP 2.x has limited support for certain XSL-FO features like SVG and tables; complex layouts may require workarounds.
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Security & dependencies

CVE tracking and dependency tree are planned for a later release.

Agent activity
11 hits · last 30 days
gptbot
3
claudebot
3
Resources