]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Fix getPixelUnitToMillimeter
authorJeremias Maerki <jeremias@apache.org>
Mon, 16 Aug 2004 19:31:41 +0000 (19:31 +0000)
committerJeremias Maerki <jeremias@apache.org>
Mon, 16 Aug 2004 19:31:41 +0000 (19:31 +0000)
Submitted by: Thomas DeWeese <Thomas.DeWeese.at.Kodak.com>

git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@197880 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/svg/AbstractFOPTranscoder.java
src/java/org/apache/fop/svg/PDFTranscoder.java

index d0d81452a1af0634f2c6df5c9728762d28e9a8a5..2a5661ebdeef1adbb1347d482ff384aa9e3aea87 100644 (file)
@@ -213,7 +213,7 @@ public abstract class AbstractFOPTranscoder extends SVGAbstractTranscoder
                 return ((Float)getTranscodingHints().get(key)).floatValue();
             } else {
                 // return 0.3528f; // 72 dpi
-                return 0.26458333333333333333333333333333f;    // 96dpi
+                return 25.4f / 96; //96dpi = 0.2645833333333333333f;
             }
         }
 
index 7cbbeb9f5fa4317b5d4bd2b776a09bd124394dbc..dc10bc7c6f807bae745fa1a5a607ce3b429ff9e5 100644 (file)
@@ -83,7 +83,8 @@ public class PDFTranscoder extends AbstractFOPTranscoder
         return new AbstractFOPTranscoder.FOPTranscoderUserAgent() {
             // The PDF stuff wants everything at 72dpi
             public float getPixelUnitToMillimeter() {
-                return 0.3427778f; //72dpi
+                //return super.getPixelUnitToMillimeter();
+                return 25.4f / 72; //72dpi = 0.352778f;
             }
         };
     }
@@ -122,6 +123,8 @@ public class PDFTranscoder extends AbstractFOPTranscoder
 
         super.transcode(document, uri, output);
 
+        getLogger().trace("document size: " + width + " x " + height);
+        
         // prepare the image to be painted
         int w = (int)(width + 0.5);
         int h = (int)(height + 0.5);