On 9/08/2011 16:28, d3d3 wrote:
I would ask a question about this sample :
http://www.itextpdf.com/examples/iia.php?id=104

There is a template named "total" at a fixed position /"createTemplate(30,
16)"/, which contains "Y".
For a pdf containing some pages in portait format and other in landscape
format, is it possible to write this template at a different position
(bottom right of each page) ?
Yes, you should adapt these lines:

table.setTotalWidth(527);
table.writeSelectedRows(0,-1,34,803, writer.getDirectContent());

The width 527 and the coordinate (34, 803) are hardcoded.
You should calculate them based on the page size of the document object of the method

onEndPage(PdfWriter  
<http://api.itextpdf.com/itext/com/itextpdf/text/pdf/PdfWriter.html>  writer,Document 
 <http://api.itextpdf.com/itext/com/itextpdf/text/Document.html>  document)


------------------------------------------------------------------------------
uberSVN's rich system and user administration capabilities and model 
configuration take the hassle out of deploying and managing Subversion and 
the tools developers use with it. Learn more about uberSVN and get a free 
download at:  http://p.sf.net/sfu/wandisco-dev2dev
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
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

Reply via email to