xmlgraphics-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Thomas Smith <thomat...@gmail.com>
Subject Re: How to use native text with EPSDocumentGraphics2D?
Date Thu, 15 Mar 2012 13:17:42 GMT
Rendering text as text is important because the output files get
unreasonably huge and slow otherwise.  This is a requirement for my
application, and I can't figure out how to do it with the Apache libraries.
 So I gave up on all y'all and found out that this is quite easy in FreeHEP.

    UserProperties p = new UserProperties();
    VectorGraphics g = new PSGraphics2D(new File("BLAH-freehep.ps"), new
Dimension(layout.getWidth(), layout.getHeight()));
    g.drawString("Hi there", 50, 50);

Also, I tried to export to SVG through Batik (1.7) with SVGGraphics2D, and
when I did a drawString of a string with an apostrophe in it, it didn't
escape the apostrophe and so it produced SVG that Chrome refused to render.
 I wonder if there's an XSS vulnerability buried in there, improper
escaping is bad news.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message