The page sizes must be the same.

Best Regards,
Paulo Soares

> -----Original Message-----
> From: Stefano Rosanelli [SMTP:[EMAIL PROTECTED]]
> Sent: Friday, February 14, 2003 15:41
> To:   [EMAIL PROTECTED]
> Subject:      [iText-questions] problem with PdfTemplate
> 
> Hi all
> 
> first of all my congratulations to the authors/developers of iTExt.. 
> great library!!
> 
> Using PdfContentByte.addTemplate I've noticed some kind of shift/offset 
> effect in the resulting document and I don't understand why.
> 
> Say I have a very simple pdf file with only a rectangle on it, importing 
> it as template on a new document will be printed with an offset in x and 
> y. [see also the 2 attachments original.pdf and result.pdf]
> 
> A snippet of code to help yuo understand:
> 
> PdfReader reader = new PdfReader(importedFile);
> document.open();
> PdfContentByte cb = writer.getDirectContent();
> 
> document.newPage();
> PdfImportedPage imported = writer.getImportedPage(reader, 1);
> cb.addTemplate(reader, 0, 0);
> 
> The offset (about 13mm in Y and 5mm in x on the A4 printed page) does 
> not depend from document margins (I tried changing them), but with 
> arguments 0,0 in method addTemplate this behaviour seems strange....
> 
> Thanks
> Stefano
> 
> 
> PS: maybe the problem/solution is known, I tried to look in the mail
> archive but didn't find an answer
>  << File: orig.pdf >>  << File: result.pdf >> 


-------------------------------------------------------
This SF.NET email is sponsored by: FREE  SSL Guide from Thawte
are you planning your Web Server Security? Click here to get a FREE
Thawte SSL guide and find the answers to all your  SSL security issues.
http://ads.sourceforge.net/cgi-bin/redirect.pl?thaw0026en
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to