Byomokesh Sahoo wrote:
> Dear All,
> 
> I wrote code to reduce page size using iText. I am getting calculate to 
> increase or decrease page size.
> 
> My code is here
> 
> Rectangle pageSize = new Rectangle(4, 56, 4482, 8369);
> Document document = new Document(pageSize);
> PdfWriter writer = PdfWriter.getInstance(document, new 
> FileOutputStream("Output.pdf"));
> writer.setCropBoxSize(new Rectangle(17, 63, 526, 657));
> writer.setBoxSize("bleed", new Rectangle(40, 40, 502, 562));
> writer.setBoxSize("trim", new Rectangle(36, 36, 396, 556));
> writer.setBoxSize("art", new Rectangle(72, 72, 360, 684));
> 
> I need 4 types page size. (7.5x8.25in, 5.5x8.5in, 7.44x9.69in, 5.51x8.27).
> 
> I could not get it to all page size. Please anyone help me.

You'll have to explain what you mean by that.
In your code, you are creating a new PDF document.
However, in your first sentence you say you want to reduce
the page size. Do you want to reduce the page size of an
existing PDF? If so, what are you expecting? (Resizing and
reflow of the content or just cropping of the existing content?)
-- 
This answer is provided by 1T3XT BVBA
http://www.1t3xt.com/ - http://www.1t3xt.info

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions

Buy the iText book: http://www.1t3xt.com/docs/book.php

Reply via email to