David Wong wrote:
Doesn't work.

Please try to understand what you are doing
before saying something doesn't work.
It probably works as we would expected
based on your code.

I am trying to put the table I create in the center of the page. How can
I do it ?

I would do as is described in the tutorial:
Get the direct content:
PdfContentByte direct_content = writer.getDirectContent();
Get a PdfTemplate of a certain size:
PdfTemplate template = direct_content.createTemplate(w, h);
Get the Graphics2D object as Paulo described:
Graphics2D graphics2d = template.createGraphicsShapes(w, h);
Do stuff with this graphics2d object.
Add the template to the direct_content at the position of your choice:
direct_content.addTemplate(template, x, y);

br,
Bruno


-------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc. Do you grep through log files
for problems?  Stop!  Download the new AJAX search engine that makes
searching your log files as easy as surfing the  web.  DOWNLOAD SPLUNK!
http://ads.osdn.com/?ad_id=7637&alloc_id=16865&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to