Ping Zhang wrote: > > Hi Paulo, > > Thank you very much for the help, but I don't know how to do that 'take > the page rotation into account'. Could you please explaining ?
Oops, I didn't see the question was already answered. Have a look at the following snippet (x is the page number) PdfImportedPage page = writer.getImportedPage(reader, x); //determine if the page needs to be rotated int rotation = reader.getPageRotation(x); if (rotation == 90 || rotation == 270) { cb.addTemplate(page, 0,-1f, 1f, 0, 0, reader.getPageSizeWithRotation(x).getHeight()); } else { cb.addTemplate(page, 1f, 0, 0, 1f, 0, 0); } -- This answer is provided by 1T3XT BVBA ------------------------------------------------------------------------- This SF.net email is sponsored by: Microsoft Defy all challenges. Microsoft(R) Visual Studio 2008. http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Do you like iText? Buy the iText book: http://www.1t3xt.com/docs/book.php Or leave a tip: https://tipit.to/itexttipjar