Hi all,

I've attached two patches for your consideration.

The first patch (pdfTranscoder.patch) fixes a bug[1] in the handling
of the viewbox for the PDF (and I suspect PS[2]) transcoders.  The patch
changes the baseclass for AbstractFOPTranscoder from XMLAbStractTranscoder to
SVGAbstractTranscoder.  The patch needs the latest CVS build of
Batik to work as I moved the creation of the BridgeContext into
a method that these classes can override in order to install their
custom bridges.

   This change allows almost all of the SVG specific code to be
removed from FOP and live in the SVGAbstractTranscoder baseclass.
This also enables the '-onload' switch for PDF output, and the ability to
transcode from Documents that are not from the Batik DOM (the
baseclass clones them automatically).

   The second patch (pdfImage.patch) 'reinstates' the direct embedding
of JPEG date streams. It takes care to only do this in appropriate cases
(JPEG drawn directly to the PDFGraphics without a filter or what ever).
In other cases it falls back to drawing the raster.  I've done a moderate
amount of testing and it seems to perform well.

   These two patches are almost totally independent - the only
overlap is in the build.xml file where I added the new files
for both when building the fop-transcoder-all.jar

   One other issue - It seems that the the PDFDocumentGraphics is
acquiring new dependencies 'scattered' around FOP (apps.Document,
area.AreaTreeControl, fo/FOTreeControl, ...).  Currently these
aren't problematic as they don't seem to reach 'deep' into the
other parts of FOP but it seems like it is a serious problem
waiting to happen (I may be wrong on this and it may be clear to
everyone in the FOP development community that these classes
shouldn't/can't have deep dependencies).

---

[1] It appeared to me that the viewbox transform was being applied
twice to the content, so it was generally scaled larger than it should
have been - leading to it being clipped on the right/bottom edges.

[2] It wasn't clear how to run the PSTranscoder, the changes are
_identical_ to those in the PDF transcoder (so much so I would
encourage you to move most of the code from 'transcode' up into the
AbstractFOPTranscoder).

Index: src/java/org/apache/fop/svg/PDFImageElementBridge.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFImageElementBridge.java,v
retrieving revision 1.2
diff -w -u -r1.2 PDFImageElementBridge.java
--- src/java/org/apache/fop/svg/PDFImageElementBridge.java      2 Jun 2003 20:20:56 
-0000       1.2
+++ src/java/org/apache/fop/svg/PDFImageElementBridge.java      8 Oct 2003 11:18:33 
-0000
@@ -53,12 +53,20 @@
 import org.apache.batik.bridge.SVGImageElementBridge;
 
 import org.apache.fop.image.JpegImage;
+import org.apache.fop.image.FopImage;
+import org.apache.fop.image.analyser.ImageReaderFactory;
 
 import java.awt.Shape;
 import java.awt.Graphics2D;
 import java.awt.geom.Rectangle2D;
+import java.net.URL;
 
+import org.w3c.dom.Element;
+
+import org.apache.batik.bridge.BridgeContext;
 import org.apache.batik.gvt.AbstractGraphicsNode;
+import org.apache.batik.gvt.GraphicsNode;
+import org.apache.batik.util.ParsedURL;
 
 /**
  * Bridge class for the <image> element when jpeg images.
@@ -72,7 +80,6 @@
      */
     public PDFImageElementBridge() { }
 
-/*
     /**
      * Create the raster image node.
      * THis checks if it is a jpeg file and creates a jpeg node
@@ -81,14 +88,19 @@
      * @param e the svg element for the image
      * @param purl the parsed url for the image resource
      * @return a new graphics node
-     *
-    protected GraphicsNode createRasterImageNode(BridgeContext ctx,
-            Element e, ParsedURL purl) {
-
+     */
+    protected GraphicsNode createImageGraphicsNode
+        (BridgeContext ctx, Element e, ParsedURL purl) {
+        GraphicsNode origGN = super.createImageGraphicsNode
+            (ctx, e, purl);
         try {
-            JpegImage jpeg = new JpegImage(new URL(purl.toString()));
-            PDFFilter filter = jpeg.getPDFFilter();
-            PDFJpegNode node = new PDFJpegNode(jpeg);
+            FopImage.ImageInfo ii = ImageReaderFactory.make
+                (purl.toString(), purl.openStream(), null);
+            if (ii.mimeType.toLowerCase() == "image/jpeg") {
+                JpegImage jpeg = new JpegImage(ii);
+                PDFJpegNode node = new PDFJpegNode(jpeg, origGN);
+
+                Rectangle2D imgBounds = getImageBounds(ctx, e);
             Rectangle2D bounds = node.getPrimitiveBounds();
             float [] vb = new float[4];
             vb[0] = 0; // x
@@ -96,17 +108,16 @@
             vb[2] = (float) bounds.getWidth(); // width
             vb[3] = (float) bounds.getHeight(); // height
 
-            // handles the 'preserveAspectRatio', 'overflow' and 'clip' and sets the
-            // appropriate AffineTransform to the image node
-            initializeViewport(ctx, e, node, vb, bounds);
-
+                // handles the 'preserveAspectRatio', 'overflow' and 'clip' 
+                // and sets the appropriate AffineTransform to the image node
+                initializeViewport(ctx, e, node, vb, imgBounds);
             return node;
+            }
         } catch (Exception ex) {
         }
 
-        return super.createRasterImageNode(ctx, e, purl);
+        return origGN;
     }
-*/
 
     /**
      * A PDF jpeg node.
@@ -115,14 +126,16 @@
      */
     public static class PDFJpegNode extends AbstractGraphicsNode {
         private JpegImage jpeg;
-
+        private GraphicsNode origGraphicsNode ;
         /**
          * Create a new pdf jpeg node for drawing jpeg images
          * into pdf graphics.
          * @param j the jpeg image
          */
-        public PDFJpegNode(JpegImage j) {
+        public PDFJpegNode(JpegImage j,
+                           GraphicsNode origGraphicsNode) {
             jpeg = j;
+            this.origGraphicsNode = origGraphicsNode;
         }
 
         /**
@@ -152,6 +165,10 @@
                 } catch (Exception e) {
                     e.printStackTrace();
                 }
+            } else {
+                // Not going directly into PDF so use
+                // original implemtation so filters etc work.
+                origGraphicsNode.primitivePaint(g2d);
             }
         }
 
Index: build.xml
===================================================================
RCS file: /home/cvs/xml-fop/build.xml,v
retrieving revision 1.89
diff -w -u -r1.89 build.xml
--- build.xml   21 Sep 2003 20:56:23 -0000      1.89
+++ build.xml   8 Oct 2003 11:16:33 -0000
@@ -534,12 +534,17 @@
     <patternset id="transcoder-classes">
       <!-- General classes -->
       <patternset>
+        <include name="org/apache/fop/apps/Document.class"/>
+        <include name="org/apache/fop/area/AreaTreeControl.class"/>
+        <include name="org/apache/fop/fo/FOTreeControl.class"/>
+        <include name="org/apache/fop/fo/FOTreeListener.class"/>
         <include name="org/apache/fop/svg/**"/>
         <include name="org/apache/fop/fonts/**"/>
         <include name="org/apache/fop/layout/Font*.class"/>
         <include name="org/apache/fop/image/FopImag*.class"/>
         <include name="org/apache/fop/image/Jpeg*"/>
         <include name="org/apache/fop/image/Abstract*"/>
+        <include name="org/apache/fop/image/analyser/*.class"/>
         <include name="org/apache/fop/util/StreamUtilities.class"/>
         <include name="org/apache/fop/util/*OutputStream.class"/>
         <include name="org/apache/fop/util/Finalizable.class"/>
@@ -599,7 +604,7 @@
       <fileset dir="${build.dest}">
         <patternset refid="transcoder-classes"/>
       </fileset>
-      <fileset dir="${build.dir}/transcoder-dependencies"/>
+      <fileset dir="${transcoder-deps}"/>
       <manifest>
         <attribute name="Implementation-Title" value="${fop-transcoder.name}"/>
         <attribute name="Implementation-Version" value="${fop-transcoder.version}"/>
Index: lib/batik.jar
===================================================================
RCS file: /home/cvs/xml-fop/lib/batik.jar,v
retrieving revision 1.10
diff -w -u -r1.10 batik.jar
Binary files /tmp/cvsrCa6Uo and batik.jar differ
Index: src/java/org/apache/fop/render/ps/PSTranscoder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/render/ps/PSTranscoder.java,v
retrieving revision 1.5
diff -w -u -r1.5 PSTranscoder.java
--- src/java/org/apache/fop/render/ps/PSTranscoder.java 8 Sep 2003 17:00:56 -0000      
 1.5
+++ src/java/org/apache/fop/render/ps/PSTranscoder.java 8 Oct 2003 11:18:32 -0000
@@ -116,6 +116,8 @@
  */
 public class PSTranscoder extends AbstractFOPTranscoder {
 
+    protected PSDocumentGraphics2D graphics = null;
+
     /**
      * Constructs a new <tt>PSTranscoder</tt>.
      */
@@ -132,21 +134,38 @@
      * @exception TranscoderException if an error occured while transcoding
      */
     protected void transcode(Document document, String uri,
-                             TranscoderOutput output) throws TranscoderException {
+                             TranscoderOutput output) 
+        throws TranscoderException {
+
+        graphics = new PSDocumentGraphics2D(false);
+
+        super.transcode(document, uri, output);
 
-        if (!(document instanceof SVGOMDocument)) {
-            throw new TranscoderException(Messages.formatMessage("notsvg",
-                    null));
+        // prepare the image to be painted
+        int w = (int)(width+.5);
+        int h = (int)(height+.5);
+
+        try {
+            graphics.setupDocument(output.getOutputStream(), w, h);
+            graphics.setSVGDimension(width, height);
+
+            if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
+                graphics.setBackgroundColor
+                    ((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
         }
-        SVGDocument svgDoc = (SVGDocument)document;
-        SVGSVGElement root = svgDoc.getRootElement();
-        // initialize the SVG document with the appropriate context
-        String parserClassname = (String)hints.get(KEY_XML_PARSER_CLASSNAME);
+            graphics.setGraphicContext
+                (new org.apache.batik.ext.awt.g2d.GraphicContext());
+            graphics.setTransform(curTxf);
 
-        PSDocumentGraphics2D graphics = new PSDocumentGraphics2D(false);
+            this.root.paint(graphics);
+
+            graphics.finish();
+        } catch (IOException ex) {
+            throw new TranscoderException(ex);
+        }
+    }
 
-        // build the GVT tree
-        GVTBuilder builder = new GVTBuilder();
+    protected BridgeContext createBridgeContext() {
         BridgeContext ctx = new BridgeContext(userAgent);
         TextPainter textPainter = null;
         textPainter = new StrokingTextPainter();
@@ -162,102 +181,7 @@
         //ctx.putBridge(pdfAElementBridge);
 
         //ctx.putBridge(new PSImageElementBridge());
-        GraphicsNode gvtRoot;
-        try {
-            gvtRoot = builder.build(ctx, svgDoc);
-        } catch (BridgeException ex) {
-            throw new TranscoderException(ex);
-        }
-        // get the 'width' and 'height' attributes of the SVG document
-        float docWidth = (float)ctx.getDocumentSize().getWidth();
-        float docHeight = (float)ctx.getDocumentSize().getHeight();
-        ctx = null;
-        builder = null;
-
-        // compute the image's width and height according the hints
-        float imgWidth = -1;
-        if (hints.containsKey(ImageTranscoder.KEY_WIDTH)) {
-            imgWidth =
-                ((Float)hints.get(ImageTranscoder.KEY_WIDTH)).floatValue();
-        }
-        float imgHeight = -1;
-        if (hints.containsKey(ImageTranscoder.KEY_HEIGHT)) {
-            imgHeight =
-                ((Float)hints.get(ImageTranscoder.KEY_HEIGHT)).floatValue();
-        }
-        float width, height;
-        if (imgWidth > 0 && imgHeight > 0) {
-            width = imgWidth;
-            height = imgHeight;
-        } else if (imgHeight > 0) {
-            width = (docWidth * imgHeight) / docHeight;
-            height = imgHeight;
-        } else if (imgWidth > 0) {
-            width = imgWidth;
-            height = (docHeight * imgWidth) / docWidth;
-        } else {
-            width = docWidth;
-            height = docHeight;
-        }
-        // compute the preserveAspectRatio matrix
-        AffineTransform px;
-        String ref = null;
-        try {
-            ref = new URL(uri).getRef();
-        } catch (MalformedURLException ex) {
-            // nothing to do, catched previously
-        }
-
-        try {
-            px = ViewBox.getViewTransform(ref, root, width, height);
-        } catch (BridgeException ex) {
-            throw new TranscoderException(ex);
-        }
-
-        if (px.isIdentity() && (width != docWidth || height != docHeight)) {
-            // The document has no viewBox, we need to resize it by hand.
-            // we want to keep the document size ratio
-            float d = Math.max(docWidth, docHeight);
-            float dd = Math.max(width, height);
-            float scale = dd / d;
-            px = AffineTransform.getScaleInstance(scale, scale);
-        }
-        // take the AOI into account if any
-        if (hints.containsKey(ImageTranscoder.KEY_AOI)) {
-            Rectangle2D aoi = (Rectangle2D)hints.get(ImageTranscoder.KEY_AOI);
-            // transform the AOI into the image's coordinate system
-            aoi = px.createTransformedShape(aoi).getBounds2D();
-            AffineTransform mx = new AffineTransform();
-            double sx = width / aoi.getWidth();
-            double sy = height / aoi.getHeight();
-            mx.scale(sx, sy);
-            double tx = -aoi.getX();
-            double ty = -aoi.getY();
-            mx.translate(tx, ty);
-            // take the AOI transformation matrix into account
-            // we apply first the preserveAspectRatio matrix
-            px.preConcatenate(mx);
-        }
-        // prepare the image to be painted
-        int w = (int)width;
-        int h = (int)height;
-
-        try {
-            graphics.setupDocument(output.getOutputStream(), w, h);
-            graphics.setSVGDimension(docWidth, docHeight);
-
-            if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
-                
graphics.setBackgroundColor((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
-            }
-            graphics.setGraphicContext(new 
org.apache.batik.ext.awt.g2d.GraphicContext());
-            graphics.setTransform(px);
-
-            gvtRoot.paint(graphics);
-
-            graphics.finish();
-        } catch (IOException ex) {
-            throw new TranscoderException(ex);
-        }
+        return ctx;
     }
 
 }
Index: src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/AbstractFOPTranscoder.java,v
retrieving revision 1.1
diff -w -u -r1.1 AbstractFOPTranscoder.java
--- src/java/org/apache/fop/svg/AbstractFOPTranscoder.java      27 Mar 2003 11:21:11 
-0000      1.1
+++ src/java/org/apache/fop/svg/AbstractFOPTranscoder.java      8 Oct 2003 11:18:33 
-0000
@@ -65,7 +65,7 @@
 import org.apache.batik.dom.util.DocumentFactory;
 import org.apache.batik.transcoder.ErrorHandler;
 import org.apache.batik.transcoder.TranscoderException;
-import org.apache.batik.transcoder.XMLAbstractTranscoder;
+import org.apache.batik.transcoder.SVGAbstractTranscoder;
 import org.apache.batik.transcoder.image.ImageTranscoder;
 import org.apache.batik.util.SVGConstants;
 import org.apache.batik.util.XMLResourceDescriptor;
@@ -74,7 +74,7 @@
 /**
  * This is the common base class of all of FOP's transcoders.
  */
-public abstract class AbstractFOPTranscoder extends XMLAbstractTranscoder
+public abstract class AbstractFOPTranscoder extends SVGAbstractTranscoder
             implements LogEnabled {
 
     /**
Index: src/java/org/apache/fop/svg/PDFTranscoder.java
===================================================================
RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java,v
retrieving revision 1.6
diff -w -u -r1.6 PDFTranscoder.java
--- src/java/org/apache/fop/svg/PDFTranscoder.java      8 Sep 2003 17:00:56 -0000      
 1.6
+++ src/java/org/apache/fop/svg/PDFTranscoder.java      8 Oct 2003 11:18:33 -0000
@@ -107,7 +107,8 @@
 public class PDFTranscoder extends AbstractFOPTranscoder
         implements Configurable {
 
-    private Configuration cfg;
+    private   Configuration         cfg      = null;
+    protected PDFDocumentGraphics2D graphics = null;
 
     /**
      * Constructs a new <tt>ImageTranscoder</tt>.
@@ -134,22 +135,10 @@
      * @exception TranscoderException if an error occured while transcoding
      */
     protected void transcode(Document document, String uri,
-                             TranscoderOutput output) throws TranscoderException {
+                             TranscoderOutput output) 
+        throws TranscoderException {
 
-        if (!(document instanceof SVGOMDocument)) {
-            throw new TranscoderException(Messages.formatMessage("notsvg",
-                    null));
-        }
-        SVGDocument svgDoc = (SVGDocument)document;
-        SVGSVGElement root = svgDoc.getRootElement();
-        // initialize the SVG document with the appropriate context
-        String parserClassname = (String)hints.get(KEY_XML_PARSER_CLASSNAME);
-
-        /*boolean stroke = true;
-        if (hints.containsKey(KEY_STROKE_TEXT)) {
-            stroke = ((Boolean)hints.get(KEY_STROKE_TEXT)).booleanValue();
-        }*/
-        PDFDocumentGraphics2D graphics = new PDFDocumentGraphics2D();
+        graphics = new PDFDocumentGraphics2D();
         ContainerUtil.enableLogging(graphics, getLogger());
         try {
             if (this.cfg != null) {
@@ -161,127 +150,57 @@
                 "Error while setting up PDFDocumentGraphics2D", e);
         }
 
-        // build the GVT tree
-        GVTBuilder builder = new GVTBuilder();
-        BridgeContext ctx = new BridgeContext(userAgent);
-        TextPainter textPainter = null;
-        textPainter = new StrokingTextPainter();
-        ctx.setTextPainter(textPainter);
+        super.transcode(document, uri, output);
 
-        PDFTextElementBridge pdfTextElementBridge;
-        pdfTextElementBridge = new PDFTextElementBridge(graphics.getFontInfo());
-        ctx.putBridge(pdfTextElementBridge);
+        // prepare the image to be painted
+        int w = (int)(width+.5);
+        int h = (int)(height+.5);
 
-        PDFAElementBridge pdfAElementBridge = new PDFAElementBridge();
-        AffineTransform currentTransform = new AffineTransform(1, 0, 0, 1, 0, 0);
-        pdfAElementBridge.setCurrentTransform(currentTransform);
-        ctx.putBridge(pdfAElementBridge);
-        ctx.putBridge(new PDFImageElementBridge());
-        GraphicsNode gvtRoot;
         try {
-            gvtRoot = builder.build(ctx, svgDoc);
-        } catch (BridgeException ex) {
-            throw new TranscoderException(ex);
-        }
-        // get the 'width' and 'height' attributes of the SVG document
-        float docWidth = (float)ctx.getDocumentSize().getWidth();
-        float docHeight = (float)ctx.getDocumentSize().getHeight();
-        ctx = null;
-        builder = null;
-
-        // compute the image's width and height according the hints
-        float imgWidth = -1;
-        if (hints.containsKey(ImageTranscoder.KEY_WIDTH)) {
-            imgWidth =
-                ((Float)hints.get(ImageTranscoder.KEY_WIDTH)).floatValue();
-        }
-        float imgHeight = -1;
-        if (hints.containsKey(ImageTranscoder.KEY_HEIGHT)) {
-            imgHeight =
-                ((Float)hints.get(ImageTranscoder.KEY_HEIGHT)).floatValue();
-        }
-        float width, height;
-        if (imgWidth > 0 && imgHeight > 0) {
-            width = imgWidth;
-            height = imgHeight;
-        } else if (imgHeight > 0) {
-            width = (docWidth * imgHeight) / docHeight;
-            height = imgHeight;
-        } else if (imgWidth > 0) {
-            width = imgWidth;
-            height = (docHeight * imgWidth) / docWidth;
-        } else {
-            width = docWidth;
-            height = docHeight;
-        }
-        // compute the preserveAspectRatio matrix
-        AffineTransform px;
-        String ref = null;
-        try {
-            ref = new URL(uri).getRef();
-        } catch (MalformedURLException ex) {
-            // nothing to do, catched previously
-        }
+            graphics.setupDocument(output.getOutputStream(), w, h);
+            graphics.setSVGDimension(width, height);
 
-        try {
-            px = ViewBox.getViewTransform(ref, root, width, height);
-        } catch (BridgeException ex) {
-            throw new TranscoderException(ex);
+            if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
+                graphics.setBackgroundColor
+                    ((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
         }
+            graphics.setGraphicContext
+                (new org.apache.batik.ext.awt.g2d.GraphicContext());
+            graphics.setTransform(curTxf);
 
-        if (px.isIdentity() && (width != docWidth || height != docHeight)) {
-            // The document has no viewBox, we need to resize it by hand.
-            // we want to keep the document size ratio
-            float d = Math.max(docWidth, docHeight);
-            float dd = Math.max(width, height);
-            float scale = dd / d;
-            px = AffineTransform.getScaleInstance(scale, scale);
-        }
-        // take the AOI into account if any
-        if (hints.containsKey(ImageTranscoder.KEY_AOI)) {
-            Rectangle2D aoi = (Rectangle2D)hints.get(ImageTranscoder.KEY_AOI);
-            // transform the AOI into the image's coordinate system
-            aoi = px.createTransformedShape(aoi).getBounds2D();
-            AffineTransform mx = new AffineTransform();
-            double sx = width / aoi.getWidth();
-            double sy = height / aoi.getHeight();
-            mx.scale(sx, sy);
-            double tx = -aoi.getX();
-            double ty = -aoi.getY();
-            mx.translate(tx, ty);
-            // take the AOI transformation matrix into account
-            // we apply first the preserveAspectRatio matrix
-            px.preConcatenate(mx);
-        }
-        // prepare the image to be painted
-        int w = (int)width;
-        int h = (int)height;
+            this.root.paint(graphics);
 
-        try {
-            graphics.setupDocument(output.getOutputStream(), w, h);
+            graphics.finish();
         } catch (IOException ex) {
             throw new TranscoderException(ex);
         }
-        graphics.setSVGDimension(docWidth, docHeight);
-        currentTransform.setTransform(1, 0, 0, -1, 0, height);
+    }
+
+    protected BridgeContext createBridgeContext() {
+        /*boolean stroke = true;
+        if (hints.containsKey(KEY_STROKE_TEXT)) {
+            stroke = ((Boolean)hints.get(KEY_STROKE_TEXT)).booleanValue();
+        }*/
+
+        BridgeContext ctx = new BridgeContext(userAgent);
+        TextPainter textPainter = null;
+        textPainter = new StrokingTextPainter();
+        ctx.setTextPainter(textPainter);
         /*if (!stroke) {
             textPainter = new PDFTextPainter(graphics.getFontInfo());
             ctx.setTextPainter(textPainter);
         }*/
 
-        if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
-            
graphics.setBackgroundColor((Color)hints.get(ImageTranscoder.KEY_BACKGROUND_COLOR));
-        }
-        graphics.setGraphicContext(new org.apache.batik.ext.awt.g2d.GraphicContext());
-        graphics.setTransform(px);
-
-        gvtRoot.paint(graphics);
+        PDFTextElementBridge pdfTextElementBridge;
+        pdfTextElementBridge = new PDFTextElementBridge(graphics.getFontInfo());
+        ctx.putBridge(pdfTextElementBridge);
 
-        try {
-            graphics.finish();
-        } catch (IOException ex) {
-            throw new TranscoderException(ex);
-        }
+        PDFAElementBridge pdfAElementBridge = new PDFAElementBridge();
+        AffineTransform currentTransform = new AffineTransform(1, 0, 0, 1, 0, 0);
+        pdfAElementBridge.setCurrentTransform(currentTransform);
+        ctx.putBridge(pdfAElementBridge);
+        ctx.putBridge(new PDFImageElementBridge());
+        return ctx;
     }
 
 }

Reply via email to