I am having no luck getting a hyperlink to work in a pdf when the text is not the url.
I have tried several variations even a few of the examples from the iText site regarding anchors. PdfPTable pTable = new PdfPTable(1); Chunk link = new Chunk("My Test Google Link"); // This DOES NOT work // Chunk link = new Chunk("http://www.google.com"); // This Works link.setAnchor("http://www.google.com"); PdfPCell pCell = new PdfPCell(); pCell = new PdfPCell(); pCell.addElement(link); pTable.addCell(pCell); getDocument().add(pTable); I am using iText version 2.1.1. Any help would be greatly appreciated. Thanks Bruno Lowagie (iText) wrote: > > Li Wang wrote: >> Hello, >> >> Is it possible to embed URL links in the PDF table >> cell? If so, could you please give me some sample code >> on how to do this? >> > When you create the content of your cell (for instance as a Paragraph or > a Phrase), > add a Chunk where you've specific the link with setAnchor(). > br, > Bruno > > -- View this message in context: http://www.nabble.com/embed-URL-link-in-the-PDF-table-cell-tp14011877p19426596.html Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- This SF.Net email is sponsored by the Moblin Your Move Developer's challenge Build the coolest Linux based applications with Moblin SDK & win great prizes Grand prize is a trip for two to an Open Source event anywhere in the world http://moblin-contest.org/redirect.php?banner_id=100&url=/ _______________________________________________ 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