Thanks. I managed to figure it out myself as it turns out but I'll
definately put in request to my boss to purchase the book.
Le 26/01/2011 14:34, 1T3XT BVBA a écrit :
Op 26/01/2011 13:51, Anthony Webster schreef:
How can I achieve this?
Did you look at any of the examples?
Did you read the book?
I tried the following without any result.
PdfContentByte canvas = writer.getDirectContent();
OK
PdfTemplate template = canvas.createTemplate(50,50);
OK
template.setColorStroke(Color.RED);
OK
template.fillStroke();
Not OK: first you fill and stroke a path (that doesn't exist yet)
template.circle(25f, 25f, 25);
Not OK: you construct a circular path (and don't fill or stroke it).
Switch both lines!
canvas.addTemplate(template, 0, 0);
Why is this necessary? This adds the template at the left bottom corner.
Image img = Image.getInstance(template);
OK
I haven't been able to find much info concerning drawing to PdfTemplates.
I'm sorry, but there's no lack of information.
Please read the book.
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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
------------------------------------------------------------------------------
Special Offer-- Download ArcSight Logger for FREE (a $49 USD value)!
Finally, a world-class log management solution at an even better price-free!
Download using promo code Free_Logger_4_Dev2Dev. Offer expires
February 28th, so secure your free ArcSight Logger TODAY!
http://p.sf.net/sfu/arcsight-sfd2d
_______________________________________________
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