Hi all ! I've just subscribe to this mailing list because I've a small problem...
What I want to do : - I have a Pdf file (in wich different page size and orientation are presents) - I have a list of scale to apply to each page I want to take each page from the original document, scale it to the requested scale (can be different for each page), and then make the page format correct (rotate if horizontal) I've done this with kind of code : --------------------------------------------------------- PdfReader pdfIn = new PdfReader(fileIn) ; Document doc = new Document(new Rectangle(pageWidth, pageHeight),0,0,0,0) ; PdfWriter writer = PdfWriter.getInstance(doc, new FileOutputStream(fileOut)); document.open() ; PdfContentByte cb = writer.getDirectContent(); for(int i = 1; i <= pdfIn.getNumberOfPages(); i++) { // do my transformations : cb.transform(AffineTransform.getScaleInstance(scale, scale)) ; cb.transform(AffineTransform.getTranslateInstance( afterScaleX - oldX, afterScaleY - oldY)) ; cb.transform(AffineTransform.getRotateInstance(thetaRotation, oldX, oldY)) ; // put the page PdfImportedPage page = writer.getImportedPage(pdfIn,i); cb.addTemplate(page, 0, 0) ; } --------------------------------------------------------- It's works fine... but i loose the digital signature as well because it's not in the importedPage but in the AcroForm... But how can I add the AcroForm to my new document and make them respect the transformations too (rotation, scale) ? Or is it another way to scale a document page by page without loosing the AcroForm ? Thanks for any help you can give to me ! Lenn Angel ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/