From 06a4ad36f67612273f489f1b6468805b9d5871c7 Mon Sep 17 00:00:00 2001 From: Keiron Liddle Date: Mon, 28 Oct 2002 08:41:01 +0000 Subject: updated docs for dev version using new forrest docs git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@195365 13f79535-47bb-0310-9956-ffa450edef68 --- src/documentation/content/xdocs/dev/extensions.xml | 95 ++++++++++++++++++++++ 1 file changed, 95 insertions(+) create mode 100644 src/documentation/content/xdocs/dev/extensions.xml (limited to 'src/documentation/content/xdocs/dev/extensions.xml') diff --git a/src/documentation/content/xdocs/dev/extensions.xml b/src/documentation/content/xdocs/dev/extensions.xml new file mode 100644 index 000000000..bc6ceeb5a --- /dev/null +++ b/src/documentation/content/xdocs/dev/extensions.xml @@ -0,0 +1,95 @@ + + + +
+ Extensions to FOP +
+ +
+ Overview +

+If the default funtionality of FOP needs to be extended for +some reason then you can write an extensions. +

+

+There are three types of extensions possible. An output document +extensions such as the PDF bookmarks, an instream-foreign-object +extensions such as SVG and an fo extension that creates an +area in the area tree where normal xsl:fo is not possible. +

+
+
+ Default Extensions +

+These extension are available by default. They are automatically loaded +and you only need to provide the correct namespace for your embedded +xml markup. +

+
+ SVG +

+Please see the SVG page for more details. +

+

+The SVG extensions gets all the xml elements in the SVG namespace +and builds an SVG DOM with batik. The SVG DOM is then rendered +to the output format using a handler for the XML content of +the instream-foreign-object. +

+
+
+ PDF Bookmarks +

+To use this standard Fop extension, you need to add a namespace entry for + http://xml.apache.org/fop/extensions on the root element.

+ +

You can provide outlines inside the root object (but outside + any page-sequences or + other formatting objects). Here's an example of an outline entry:

+ + + + + Running FOP + + + Prerequisites + + + +]]> +

It works similarly to a basic-link. There is also an external-destination + property, but it isn't supported currently. See the pdfoutline.pdf for a more complete example. +

+
+
+
+ Adding Your Own +

+To add your own extension you need to do the following things. +

+

+Write code that implements your extension functionality. +There are some examples in the contrib/ directory. +

+

+Create a jar file with your classes, it must also include the +following file "/META-INF/services/org.apache.fop.fo.ElementMapping". +In this file you need to put the fully qualified classname of +your element mappings class. This class must implement the +"org.apache.fop.fo.ElementMapping" interface. +

+

+Create your fo file with the extra xml data embedded in the file +with the correct name space. The examples for svg and +pdfoutline.pdf +show how this can be done. +

+

+Put your jar file in the classpath and then run fop over the fo file. +

+
+ +
+ -- cgit v1.2.3