I ran into an issue when there is a tab in a chunk: if there is an underlined chunk after the tab, the underline is offset to the left. It took me a while to figure out that there was a tab and it did that. Try the code below and you'll see the issue. I saw a mention that tab support was done in 2008. Should I file a bug or keep stripping the tabs of the text?
I attached a screen shot, but I don't know if the list allows them. Thanks Fred Code: Document document = new Document(); try { PdfWriter.getInstance(document, new FileOutputStream("fox_dog_chunk.pdf")); document.open(); Paragraph p = new Paragraph(); p.setIndentationLeft(50); p.setIndentationRight(20); p.add(new Chunk("before\t")); // TAB here Chunk chunk = new Chunk(); Font font = chunk.getFont(); font.setStyle(Font.UNDERLINE); chunk.append("underlined"); p.add(chunk); p.add(new Chunk(" after")); document.add(p); } catch (DocumentException de) { System.err.println(de.getMessage()); } catch (IOException ioe) { System.err.println(ioe.getMessage()); } document.close();
<<attachment: iTextTAB.jpg>>
------------------------------------------------------------------------------ Download Intel® Parallel Studio Eval Try the new software tools for yourself. Speed compiling, find bugs proactively, and fine-tune applications for parallel performance. See why Intel Parallel Studio got high marks during beta. http://p.sf.net/sfu/intel-sw-dev
_______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php Check the site with examples before you ask questions: http://www.1t3xt.info/examples/ You can also search the keywords list: http://1t3xt.info/tutorials/keywords/