On Sat, Sep 24, 2011 at 1:10 AM, 1T3XT BVBA <[email protected]> wrote:
> On 24/09/2011 0:52, Arthur Murray wrote:
>> In Acrobat the Crop function has the option to 'Remove White Margins'
>> and it shrinks the margins to precisely fit the text and images, with
>> no white border margins.
>>
>> Is there some sample java code that would do this with iText (how to
>> figure out what this minimal bounding rectangle would be without
>> cropping out any text or image)?
>
> There's an example in chapter 15 that allows you to find the text margins.
> It should be adapted to take image margins too.

If I figure out how to take into account the image co-ordinates, will
I have to add anything to account for form fields and lines, shapes, &
background drawings, and anything else in the PDF?  I don't want to
crop out _anything_, other than white space.

For example, the ShowTextMargins example doesn't completely
encapsulate the line under "Preface".
http://examples.itextpdf.com/results/part4/chapter15/margins.pdf

example of a background drawing (i think)
http://examples.itextpdf.com/results/part1/chapter05/hero1.pdf

------------------------------------------------------------------------------
All of the data generated in your IT infrastructure is seriously valuable.
Why? It contains a definitive record of application performance, security
threats, fraudulent activity, and more. Splunk takes this data and makes
sense of it. IT sense. And common sense.
http://p.sf.net/sfu/splunk-d2dcopy2
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

iText(R) is a registered trademark of 1T3XT BVBA.
Many questions posted to this list can (and will) be answered with a reference 
to the iText book: http://www.itextpdf.com/book/
Please check the keywords list before you ask for examples: 
http://itextpdf.com/themes/keywords.php

Reply via email to