]> source.dussan.org Git - xmlgraphics-fop.git/commitdiff
Bugfix: Make sure floats and doubles are not formatted using exponential format becau... Temp_PDF_in_PDF Temp_PDF_in_PDF
authorJeremias Maerki <jeremias@apache.org>
Wed, 3 Oct 2007 09:58:33 +0000 (09:58 +0000)
committerJeremias Maerki <jeremias@apache.org>
Wed, 3 Oct 2007 09:58:33 +0000 (09:58 +0000)
git-svn-id: https://svn.apache.org/repos/asf/xmlgraphics/fop/branches/Temp_PDF_in_PDF@581550 13f79535-47bb-0310-9956-ffa450edef68

src/java/org/apache/fop/pdf/PDFObject.java

index c4c8c3a1d452e473c54020794d089284c0adcc3e..8152fcd8336aed443fabea027291026ca050fcd1 100644 (file)
@@ -256,7 +256,11 @@ public abstract class PDFObject implements PDFWritable {
         } else if (obj instanceof PDFWritable) {
             sb.append(((PDFWritable)obj).toInlinePDFString());
         } else if (obj instanceof Number) {
-            sb.append(obj);
+            if (obj instanceof Double || obj instanceof Float) {
+                sb.append(PDFNumber.doubleOut(((Number)obj).doubleValue()));
+            } else {
+                sb.append(obj);
+            }
         } else if (obj instanceof Boolean) {
             sb.append(obj);
         } else {