aboutsummaryrefslogtreecommitdiffstats
path: root/src/java/org
diff options
context:
space:
mode:
authorJeremias Maerki <jeremias@apache.org>2005-11-10 16:09:03 +0000
committerJeremias Maerki <jeremias@apache.org>2005-11-10 16:09:03 +0000
commit792c66ee02b239b857d72669697312e5e7d82932 (patch)
treea46959eb20fea5a13335a6ec106702477e21f773 /src/java/org
parent1c8b099ab71bda44223acaf39c0939c977f7d58b (diff)
downloadxmlgraphics-fop-792c66ee02b239b857d72669697312e5e7d82932.tar.gz
xmlgraphics-fop-792c66ee02b239b857d72669697312e5e7d82932.zip
Scale factor was wrong. Base must be 72dpi, not the default resolution of the PDFDocumentGraphics2D.
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/trunk@332319 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'src/java/org')
-rw-r--r--src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
index 43d0cdf3c..ffe99b8f2 100644
--- a/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
+++ b/src/java/org/apache/fop/svg/PDFDocumentGraphics2D.java
@@ -67,6 +67,8 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D
private float svgWidth;
private float svgHeight;
+ /** Normal PDF resolution (72dpi) */
+ public static final int NORMAL_PDF_RESOLUTION = 72;
/** Default device resolution (300dpi is a resonable quality for most purposes) */
public static final int DEFAULT_NATIVE_DPI = 300;
@@ -343,8 +345,8 @@ public class PDFDocumentGraphics2D extends PDFGraphics2D
currentStream.write("" + PDFNumber.doubleOut(scaleX) + " 0 0 "
+ PDFNumber.doubleOut(scaleY) + " 0 0 cm\n");
}
- if (deviceDPI != DEFAULT_NATIVE_DPI) {
- double s = DEFAULT_NATIVE_DPI / deviceDPI;
+ if (deviceDPI != NORMAL_PDF_RESOLUTION) {
+ double s = NORMAL_PDF_RESOLUTION / deviceDPI;
at.scale(s, s);
currentStream.write("" + PDFNumber.doubleOut(s) + " 0 0 "
+ PDFNumber.doubleOut(s) + " 0 0 cm\n");