aboutsummaryrefslogtreecommitdiffstats
path: root/docs
diff options
context:
space:
mode:
Diffstat (limited to 'docs')
-rw-r--r--docs/xml-docs/fop/embedding.xml13
1 files changed, 13 insertions, 0 deletions
diff --git a/docs/xml-docs/fop/embedding.xml b/docs/xml-docs/fop/embedding.xml
index 5f6e46f94..c74ba2bdf 100644
--- a/docs/xml-docs/fop/embedding.xml
+++ b/docs/xml-docs/fop/embedding.xml
@@ -50,6 +50,19 @@
driver.setOutputStream(new FileOutputStream(args[1]));
driver.render();
]]></source>
+ <p>You can also specify an xml and xsl file for the input.
+ </p>
+ <p>Here is an example use of Driver with the XSLTInputHandler:</p>
+ <source><![CDATA[
+ Driver driver = new Driver();
+ driver.setRenderer(Driver.RENDER_PDF);
+ InputHandler inputHandler = new XSLTInputHandler(xmlFile, xslFile);
+ XMLReader parser = inputHandler.getParser();
+ driver.buildFOTree(parser, inputHandler);
+ driver.format();
+ driver.setOutputStream(new FileOutputStream(outFile));
+ driver.render();
+]]></source>
<p>Have a look at the classes CommandLineStarter or FopServlet for complete examples.</p>
</s2>
<s2 title="Using Fop in a servlet">