> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of color_prepress
> Sent: Monday, December 13, 2004 9:01 AM
> To: [EMAIL PROTECTED]
> Subject: [iText-questions] anyone using itext1.02 to crop pdf 
> page size?found any problem?
> 
> eg. my source pdf page size is 360pts width and 720pts height.
> here, after using pdfreader toget the page and using
> PdfImportedPage.setBoundingBox(new Rectangle(36,36,36,36));

Are you shure? A Rectangle(36,36,36,36) has zero width and height.
 
> to crop that
> page. the final page size for this page is 288pts width and 
> 648pts height.
> then I create a new blank pdf and use ContentByte's
> addTemplate(importedpage,0.0f,0.0f); to add the page into it 
> in x=0,y=0.
> In acrobat reader, I found out that the imported page is at location
> x=36,y=36.
> that mean there is from left got 36pts white,36pts white from bottom.
> 
> From there, I think when setboundingbox, it just erase the 
> image at that
> part, then when I place inside, the page side is still 324pts 
> width and
> 684pts height.(the right side and top side 36pts is really been
> cropped!)only left and bottom side have exactly 36pts of white space.
> 
> so now to handle this issue, I had to set the imported in 
> x=-36,y=-36 so
> that it move it to left and bottom each 36 then it will at x=0,y=0.
> is this bug?

No bug. Cropping just hides the margins but you have to take them into
account when placing the page.


-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now.
http://productguide.itmanagersjournal.com/
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to