  | Mailing List | | Home | | Forum Home | | JBoss - Java Application Server | | Tomcat - JSP/Servlet container | | Struts - A MVC web framework | | iText - An open source PDF Java Library | | JDOM - JDOM XML Parser | | JSP - A mailing list about Java Server Pages specification and reference | | J2EE - A mailing list for Java(tm) 2 Platform, Enterprise Edition | | J2EE Pattern - An interest list for Sun Java Center J2EE Pattern Catalog | | Servlet - A mailing list for discussion about Sun Microsystem's Java Servlet API Technology | |
Struts & Hibernate
|
|
|
  | | | Subject: Re: Question about combining PdfCopy and PdfWriter | Subject: Re: Question about combining PdfCopy and PdfWriter 2007-11-06 - By Bruno Lowagie (iText)
Back James Beard wrote: > I am currently using iText 2.0.2 - do I need a later version than this for > the newer PdfCopy functionality mentioned below?
Only if you want to stamp extra info on the PDF. Then you'd need at least 2.0.5 (but I'd prefer using 2.0.6).
> Also how do I add the crop regions using PdfReader?
I can't find an example that crops pages, but have a look at this one that rotates pages: http://itext.ugent.be/itext-in-action/examples/chapterX/RotatePages.java
Especially this is important: pageDict = reader.getPageN(i); pageDict.put(PdfName.ROTATE, new PdfNumber(rot + 90));
In this example, we get the page dictionary (pageDict) and we add or replace the Rotate key and value.
You could easily replace or add the Cropbox key in a similar way.
br, Bruno
-- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ---- ----- This SF.net email is sponsored by: Splunk Inc. Still grepping through log files to find problems? Stop. Now Search log events and configuration files using AJAX and a browser. Download your FREE copy of Splunk now >> http://get.splunk.com/ __ ____ ____ ____ ____ ____ ____ ____ ____ ____ iText-questions mailing list iText-questions@(protected) https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
|
|
 |