Hello all,

I am writing a script where i need to add a PDF to a main PDF. The first PDF
is usually half a page or less than a page, and when i get the new document
i am copying the whole page, therefore i have a lot of unwanted whitespace.
What i tought will fix my problem was eliminating all the white space from
the first PDF document, but still when i paste it, it creates a new page and
adds all the unwanted whitespace.

Here is my code:


PdfReader reader =
*new* PdfReader("documentToPase.pdf");

*for*(*int* x = 1; x<=reader.getNumberOfPages();x++){

*PdfImportedPage* page = writer.getImportedPage(reader,x);

Image image = Image.*getInstance*(page);

document.add(image);

}

I also attatch a example of how i eliminated all the whitespace.

 Thanks in advance

Attachment: documentToPaste.pdf
Description: Adobe PDF document

-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

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

Reply via email to