Paulo, You said:
"Put it inside another template with the right dimensions." Can you provide more detail on how I would do that? I assume you mean put the PDFTemplate into another template? I am looping through a data set when creating the template, so there is a varying amount of white space on the left that I'd like to chop before changing it to an Image for further manipulation. Thanks, I am still learning iText. Steve > > -----Original Message----- > > From: [EMAIL PROTECTED] > > [mailto:[EMAIL PROTECTED] On > > Behalf Of Steven Landry > > Sent: Sunday, April 22, 2007 7:15 PM > > To: [email protected] > > Subject: [iText-questions] Cropping PDFTemplate? > > > > I am adding rectangles and text to a PDFTemplate and would > > like to crop > > off a few inches into the left side before using it as a parameter in > > the Image.getInstance() line. > > > > Here's a code snippet. > > > > PdfTemplate template = null; > > template = docWriter.getDirectContent().createTemplate(2000, 2000); > > // ... adding things to the template > > Image m2 = Image.getInstance(template); > > m2.scaleToFit(900,900); > > m2.setAbsolutePosition(0,0); > > docWriter.getDirectContent().addImage(m2); > > > > Any one have any ideas on how I could "crop" the PDFTemplate > > before it > > becomes an Image? > > > > Thank you, > > > > Steve > ------------------------------------------------------------------------- This SF.net email is sponsored by DB2 Express Download DB2 Express C - the FREE version of DB2 express and take control of your XML. No limits. Just data. Click to get it now. http://sourceforge.net/powerbar/db2/ _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
