No, it is not possible with PDF in general (has nothing to do with iText). You should consider using regular content (aka a Stamp) instead.
-----Original Message----- From: [email protected] [mailto:[email protected]] Sent: Wednesday, February 10, 2010 6:21 PM To: [email protected] Subject: [iText-questions] How to underline/strikethru a FREETEXT Annotation? I wonder if it is possible with iText to underline/strikethru a FREETEXT PdfAnnotation. My current code: PdfContentByte pcb = new PdfContentByte(writer); BaseFont font = FontFactory.getFont(BaseFont.HELVETICA, 20, Font.STRIKETHRU).getCalculatedBaseFont(false); pcb.setFontAndSize(font, 20); pcb.setColorFill(BaseColor.RED); PdfAnnotation freeText = PdfAnnotation.createFreeText(writer, new Rectangle(startX, startY, endX, endY), "My text to underline", pcb); writer.addAnnotation(freeText); Changing the style of the Font that I get from FontFactory only works with BOLD and ITALIC - but not for UNDERLINE or STRIKETHRU. Could anybody please help me out there? How can I add an underline for a FREETEXT Annotation (yes, it has to be an Annotation). Thank you very much! -- NEU: Mit GMX DSL über 1000,- ¿ sparen! http://portal.gmx.net/de/go/dsl02 ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ 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 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/ ------------------------------------------------------------------------------ SOLARIS 10 is the OS for Data Centers - provides features such as DTrace, Predictive Self Healing and Award Winning ZFS. Get Solaris 10 NOW http://p.sf.net/sfu/solaris-dev2dev _______________________________________________ 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 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/
