aboutsummaryrefslogtreecommitdiffstats
path: root/src/org/apache/fop/apps
diff options
context:
space:
mode:
Diffstat (limited to 'src/org/apache/fop/apps')
-rw-r--r--src/org/apache/fop/apps/StreamRenderer.java18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/org/apache/fop/apps/StreamRenderer.java b/src/org/apache/fop/apps/StreamRenderer.java
index d18ddd6cd..1c22a2e45 100644
--- a/src/org/apache/fop/apps/StreamRenderer.java
+++ b/src/org/apache/fop/apps/StreamRenderer.java
@@ -82,6 +82,11 @@ public class StreamRenderer {
*/
private IDReferences idReferences = new IDReferences();
+ /**
+ * The list of extensions.
+ */
+ private Vector extensions = new Vector();
+
private Logger log;
public StreamRenderer(OutputStream outputStream, Renderer renderer) {
@@ -97,6 +102,10 @@ public class StreamRenderer {
return idReferences;
}
+ public void addExtension(ExtensionObj ext) {
+ extensions.addElement(ext);
+ }
+
public void startRenderer()
throws SAXException {
pageCount = 0;
@@ -169,6 +178,15 @@ public class StreamRenderer {
AreaTree a = new AreaTree(this);
a.setFontInfo(fontInfo);
+ for(Enumeration e = extensions.elements(); e.hasMoreElements(); ) {
+ ExtensionObj ext = (ExtensionObj)e.nextElement();
+ try {
+ ext.format(a);
+ } catch (FOPException fope) {
+ throw new SAXException(fope);
+ }
+ }
+
try {
pageSequence.format(a);
} catch (FOPException e) {