for those of you who just need to load an SVG image and are a little put off by Batik's size and bazillion jar dependency graph, i'd thought i share a lightweight alternative i ran across:
https://svgsalamander.dev.java.net/ it is a single, self-contained jar and is ~276K in size. don't know how well supported it is, but it worked for me. i had an image, 318x90, and here is what it took to load it: PdfTemplate template = pdf.createTemplate(318.5f, 39.0f); Graphics2D graphics = template.createGraphics(318.5f, 39.0f); try { SVGUniverse universe = SVGCache.getSVGUniverse(); URI uri = universe.loadSVG( getClass().getResourceAsStream("/media/images/logo.svg"), "logo"); SVGDiagram diagram = universe.getDiagram(uri); diagram.render(graphics); } finally { graphics.dispose(); } Image image = Image.getInstance(template); jeff ######################################################################## "This email message, including any attachments, is for the sole use of the intended recipients and may contain confidential and privileged information. Unauthorized use, disclosure or distribution of this email is strictly forbidden. If you have received this message in error, please reply to the above sender notifying them of this error, and then kindly delete the message." ######################################################################## ------------------------------------------------------------------------------ Create and Deploy Rich Internet Apps outside the browser with Adobe(R)AIR(TM) software. With Adobe AIR, Ajax developers can use existing skills and code to build responsive, highly engaging applications that combine the power of local resources and data with the reach of the web. Download the Adobe AIR SDK and Ajax docs to start building applications today-http://p.sf.net/sfu/adobe-com _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
