|
Hi, I changed my code to what you mentioned Vibhav, but still no success, here is what the code looks like now. document = new Document(PageSize.A4); PdfWriter.getInstance(document, new FileOutputStream("ContactSheet02.pdf")); document.open(); htmlWorker = new HTMLWorker(document); HashMap interfaceProps = new HashMap(); interfaceProps.put("IMG_BASEURL", "/Users/"); StyleSheet styles = new StyleSheet(); styles.loadTagStyle("li", "face", "garamond"); styles.loadTagStyle("span", "size", "8px"); styles.loadTagStyle("body", "font-family", "times new roman"); styles.loadTagStyle("body", "font-size", "10px"); StringReader strReader = new StringReader(str.toString()); ArrayList<Element> objects = htmlWorker.parseToList(strReader, styles, interfaceProps); for (int k = 0; k < objects.size(); ++k) document.add((Element) objects.get(k)); document.close(); It just creates the PDF without the images :(. Oh, I am using iText version 2.1.4, not sure if that makes a difference. Regards, Vivek
|
------------------------------------------------------------------------------ Free Software Download: Index, Search & Analyze Logs and other IT data in Real-Time with Splunk. Collect, index and harness all the fast moving IT data generated by your applications, servers and devices whether physical, virtual or in the cloud. Deliver compliance at lower cost and gain new business insights. http://p.sf.net/sfu/splunk-dev2dev
_______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions
Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php

