If you used the Acrobat crop tool you'll need to place the template using PdfReader.getCropBox() instead of PdfReader.getPageSize().
Best Regards, Paulo Soares > -----Original Message----- > From: Lange, Jeffrey D. [SMTP:[EMAIL PROTECTED] > Sent: Friday, May 30, 2003 15:36 > To: '[EMAIL PROTECTED]' > Subject: [iText-questions] Compiled PDF Margins For Exact Form > > Hello - > I have a 5-page hardcopy version of an MS Word-created form that I scanned > in as 5 separate blank PDF page "templates". I am using iText to populate > each template page with data which then gets re-compiled as a new PDF with > the form data in all the right fields. All of that part works fine. > > The problem I am having is that I cropped the original scanned PDF > template very specifically so that the margins match the original hardcopy > that I scanned exactly. This is because the form is going to be put > through an OCR reader which is really picky so I need to have the exact > same margins as the original. When the new PDF gets compiled with the > data using iText code (see attached example) the resulting PDF's margins > are different than my template (too big). Does anyone know how I can just > get the final compiled PDF to keep the exact same margins as my template? > > > I have tried adjusting the <Document document = new Document(PageSize.A4, > 0, 0, 0, 0);> properties but have had no luck. > > Any help would be greatly appreciated! Thank you in advance... > Jeff Lange > [EMAIL PROTECTED] <mailto:[EMAIL PROTECTED]> ------------------------------------------------------- This SF.net email is sponsored by: eBay Get office equipment for less on eBay! http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5 _______________________________________________ iText-questions mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/itext-questions
