gmazza      2003/11/04 13:56:23

  Modified:    src/java/org/apache/fop/svg PDFTranscoder.java
  Log:
  Tom DeWeese's changes made;
  See: http://marc.theaimsgroup.com/?l=fop-dev&m=106795227230411&w=2
  
  Revision  Changes    Path
  1.8       +14 -2     xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java
  
  Index: PDFTranscoder.java
  ===================================================================
  RCS file: /home/cvs/xml-fop/src/java/org/apache/fop/svg/PDFTranscoder.java,v
  retrieving revision 1.7
  retrieving revision 1.8
  diff -u -r1.7 -r1.8
  --- PDFTranscoder.java        11 Oct 2003 14:48:49 -0000      1.7
  +++ PDFTranscoder.java        4 Nov 2003 21:56:23 -0000       1.8
  @@ -64,6 +64,7 @@
   import org.apache.batik.bridge.BridgeContext;
   import org.apache.batik.bridge.BridgeException;
   import org.apache.batik.bridge.GVTBuilder;
  +import org.apache.batik.bridge.UserAgent;
   import org.apache.batik.bridge.ViewBox;
   import org.apache.batik.dom.svg.SVGOMDocument;
   import org.apache.batik.gvt.GraphicsNode;
  @@ -116,10 +117,21 @@
       public PDFTranscoder() {
           super();
           this.handler = new FOPErrorHandler();
  -
       }
   
       /**
  +     * @see org.apache.fop.svg.AbstractFOPTranscoder#createUserAgent()
  +     */
  +    protected UserAgent createUserAgent() {
  +        return new SVGAbstractTranscoderUserAgent() {
  +                // The PDF stuff wants everything at 72dpi
  +                public float getPixelUnitToMillimeter() {
  +                    return 0.3427778f;
  +                }
  +        };
  +    }
  +    
  +    /**
        * @see 
org.apache.avalon.framework.configuration.Configurable#configure(Configuration)
        */
       public void configure(Configuration cfg) throws ConfigurationException {
  @@ -158,7 +170,7 @@
   
           try {
               graphics.setupDocument(output.getOutputStream(), w, h);
  -            graphics.setSVGDimension(width, height);
  +            graphics.setSVGDimension(w, h);
   
               if (hints.containsKey(ImageTranscoder.KEY_BACKGROUND_COLOR)) {
                   graphics.setBackgroundColor
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to