Here is what I am doing... PdfReader reader = new PdfReader("C:\\originalPDF.pdf"); PdfWriter writer = PdfWriter.getInstance(document, new FileOutputStream("C:\\newPDF.pdf")); PdfImportedPage page = page = writer.getImportedPage(reader, 1); cb.addTemplate(page, 0, 0); <---- need to center it somehow
Image img = Image.getInstance("C:\\_projects\\GPO\\Final_PKI_logo.jpg"); img.scaleToFit(img.width() / 2, img.height() / 2); img.setAbsolutePosition(470, 780); cb.addImage(img); cb.stroke(); >From: Bruno Lowagie <[EMAIL PROTECTED]> >Reply-To: Post all your questions about iText here ><itext-questions@lists.sourceforge.net> >To: Post all your questions about iText here ><itext-questions@lists.sourceforge.net> >Subject: Re: [iText-questions] Centering PdfTemplate on new page... >Date: Fri, 09 Mar 2007 18:27:49 +0100 > >Rick DeFazio wrote: > > Bruno, your suggestion of wrapping a pdfTemplate in an Image to center >it on > > the new page... how would that work? > >I didn't know you were adding the Image to the direct content. >br, >Bruno > >------------------------------------------------------------------------- >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/ _________________________________________________________________ Your Space. Your Friends. Your Stories. Share your world with Windows Live Spaces. http://spaces.live.com/?mkt=en-ca ------------------------------------------------------------------------- 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/