From 7392679545d2d15b7ea85b8713259159e547058e Mon Sep 17 00:00:00 2001 From: Jeremias Maerki Date: Wed, 3 Oct 2007 09:58:33 +0000 Subject: [PATCH] Bugfix: Make sure floats and doubles are not formatted using exponential format because PDF doesn't support it. 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 | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/java/org/apache/fop/pdf/PDFObject.java b/src/java/org/apache/fop/pdf/PDFObject.java index c4c8c3a1d..8152fcd83 100644 --- a/src/java/org/apache/fop/pdf/PDFObject.java +++ b/src/java/org/apache/fop/pdf/PDFObject.java @@ -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 { -- 2.39.5