Return-Path: X-Original-To: apmail-xmlgraphics-general-archive@www.apache.org Delivered-To: apmail-xmlgraphics-general-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 266759815 for ; Thu, 15 Mar 2012 14:48:44 +0000 (UTC) Received: (qmail 20021 invoked by uid 500); 15 Mar 2012 14:48:43 -0000 Mailing-List: contact general-help@xmlgraphics.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: general@xmlgraphics.apache.org Delivered-To: mailing list general@xmlgraphics.apache.org Delivered-To: moderator for general@xmlgraphics.apache.org Received: (qmail 70919 invoked by uid 99); 15 Mar 2012 13:18:10 -0000 X-ASF-Spam-Status: No, hits=1.5 required=5.0 tests=HTML_MESSAGE,RCVD_IN_DNSWL_LOW,SPF_PASS X-Spam-Check-By: apache.org Received-SPF: pass (nike.apache.org: domain of thomathom@gmail.com designates 74.125.82.182 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=JAd5iX2OkLLoXraj71OmU8BGRbsZBb49pQEx2fW3Vsg=; b=ig8wNaHv86UbgV5pKvzCxtMEa6eMSUFOrpfJBNHofxhV7XzktRemsxp4pnXWj7Iysm suURjFzzb9a9fI4/T4ChbplRxMgLkLszafyi6p6yI7EZAjDqgVi5SKV07mjAFywm0xvt GNHWQOCKC6e+2V0deuyDlIuZiBSQrPz2jjMIn7EmvuK/yBePxR/fT5FCx8MjLfkTIywp muILOpwTrgb4sj0yHrA6w+5sdNv0JQys8z7xm4BJJG5x7tI6j1y7eCRd3v1XuM29Hawu yyHEQYCt0hW4O0BYN6qm2yHirdSb9SmywqlkjaGaTBlj+JEBmHD8056GZ3HJzDmyGYd+ lFRA== MIME-Version: 1.0 In-Reply-To: References: Date: Thu, 15 Mar 2012 09:17:42 -0400 Message-ID: Subject: Re: How to use native text with EPSDocumentGraphics2D? From: Thomas Smith To: general@xmlgraphics.apache.org Content-Type: multipart/alternative; boundary=e89a8f3ba085c696d304bb47eaf5 X-Virus-Checked: Checked by ClamAV on apache.org --e89a8f3ba085c696d304bb47eaf5 Content-Type: text/plain; charset=ISO-8859-1 Hi, 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(); p.setProperty(PSGraphics2D.TEXT_AS_SHAPES,false); VectorGraphics g = new PSGraphics2D(new File("BLAH-freehep.ps"), new Dimension(layout.getWidth(), layout.getHeight())); g.setProperties(p); g.startExport(); g.drawString("Hi there", 50, 50); g.endExport(); g.dispose(); 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. -Thomas --e89a8f3ba085c696d304bb47eaf5--