You are viewing a plain text version of this content. The canonical link for it is here.
Posted to fop-dev@xmlgraphics.apache.org by bu...@apache.org on 2003/11/04 16:13:26 UTC

DO NOT REPLY [Bug 23883] - SVG embedded in FO cannot handle large (6digit) translates

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=23883

SVG embedded in FO cannot handle large (6digit) translates





------- Additional Comments From tom.vijlbrief@xs4all.nl  2003-11-04 15:13 -------
OK, the cause of the bug is a buggy doubleOut() implementation which
does not expect scientific notation (1.0E-4) for small numbers. The next
implementation (tested in 0.20.5) looks to solve most problems, although
lines are still drawn wrong with at least Acrobat5. I cannot test
with Acrobat6, cause that's not installed at this workstation.
(I'll look at that at home)

=============pdf/PDFNumber.java====================
public class PDFNumber {

    static java.text.DecimalFormat myFormatter = new java.text.DecimalFormat("#.
########");

    public static String doubleOut(Double doubleDown) {
        return doubleOut(doubleDown.doubleValue());
    }

    public static String doubleOut(double doubleDown) {
        return myFormatter.format(doubleDown);
    }

    public static String doubleOut(double doubleDown, int dec) {
        return doubleOut(doubleDown);
    }

}