Hi,
I have created a pdf document using the Graphics2D that displays element in a
table. Now, for the elements within table, I want to make them hyperlinks that
will launch HTML pages. Problem is I cannot figure out how I can pass the URL
information to iText as I am passing the graphics2D object?
Following is a sample code:
---------------------------------------
Document doc = new Document(pageSize);
PdfWriter writer = PdfWriter.getInstance(doc, out);
doc.open();
PdfContentByte cb = writer.getDirectContent();
//
for( int i = 0; i < numberOfPages; i++ )
{
//PDFPage page = doc.appendNewPage( width, height );
doc.newPage();
PdfTemplate tp = cb.createTemplate(width, height);
Graphics2D g2D = tp.createGraphics(width, height, new
DefaultFontMapper());
printableObject.print( g2D, pageFormat, i );
cb.addTemplate(tp, 0, 0);
}
doc.close();
-----------------------
Is there any way I can pass the URL information so that iText can create the
table elements with hyperlinks?
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://www.1t3xt.com/docs/book.php