> -----Original Message-----
> From: [EMAIL PROTECTED] 
> [mailto:[EMAIL PROTECTED] On 
> Behalf Of lloyd thompson
> Sent: Tuesday, April 11, 2006 4:50 PM
> To: [email protected]
> Subject: RE: [iText-questions] Image appears 0.5cm off 
> correct Y coordinate when printed
> 
> I'm finding little documentation on what a crop box is. I 
> created the test
> document to be stamped with I-Text and I'm not aware that I 
> put any crop box
> in. The only reference to a crop box I have found is the 
> 'setCropBoxSize'
> method on the PdfDocument Class, which is a private method?
> 
> Assuming it is a crop box that is making my image render at 
> the incorrect
> position, how do I remedy the situation? How do I 
> programmatically check for
> a crop box?
>

PdfReader.getCropBox(), check if it's the same as the media box.
 
> Finally, if this crop box is a Red Herring, what else could 
> be making my
> stamped image render in the incorrect position?
> 

No idea. If possible post the pdf and any other files needed to
reproduce the problem.

Paulo

> Thanks,
> 
> Lloyd 
> 
> -----Original Message-----
> 
> Check that you don't have a crop box in the page.
> 
> 
> > Hi,
> >
> >
> >
> > I'm creating a Class that will be used to stamp headers, footers and
> > barcodes on existing documents and to do this I intend to use a 
> > PDFStamper.
> > I am aware that the (0,0) co-ordinate in I-Text is at the 
> bottom left 
> > corner
> > and so assuming I want to add a picture at X=10cm and Y=25cm I have 
> > written
> > some code as follows:
> >
> >
> >
> >
> >
> > double xInMM=100;
> >
> > double yInMM=250;
> >
> > double mmToPoint=2.834644567;
> >
> > float xInPoints=(float)(xInMM*mmToPoint);
> >
> > float yInPoints=(float)(yInMM*mmToPoint);
> >
> >
> >
> > PdfReader reader = new PdfReader("C://input.pdf");
> >
> > PdfStamper stamp = new PdfStamper(reader, new
> > FileOutputStream("C://output.pdf"));
> >
> >
> >
> > Image img = Image.getInstance("C://square.bmp");
> >
> > img.setAbsolutePosition(xInPoints, yInPoints);
> >
> >
> >
> > // text over the existing page
> >
> > PdfContentByte over = stamp.getOverContent(1);
> >
> > over.addImage(img);
> >
> >
> >
> > Having printed the 'stamped' document, I find that the X 
> co-ordinate is
> > correct, yet the Y co-ordinate is approximately 1/2cm out, 
> i.e. my square
> > appears at 24.5cm. Where is this offset coming from? Which 
> object can I 
> > use
> > to get hold of this value.
> >
> >
> >
> > Many thanks,
> >
> >
> >
> > Lloyd
> >
> >
> >
> >
> >
> ______________________________________________________________
> ______________
> >
> > This e-mail (and any attachments) may contain privileged and/or 
> > confidential
> > information. If you are not the intended recipient please 
> do not disclose,
> > copy, distribute, disseminate or take any action in reliance on it.
> >
> > If you have received this message in error please inform us 
> and delete it.
> > Should you wish to communicate with us by e-mail we cannot 
> guarantee the 
> > security
> > of any data outside our own computer systems.
> >
> > For the protection of our systems and staff, incoming and outgoing
> > emails are automatically scanned for viruses and content.
> >
> > 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&;
> dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 
> 
> 
> ______________________________________________________________
> ______________
> 
> This e-mail (and any attachments) may contain privileged 
> and/or confidential
> information. If you are not the intended recipient please do 
> not disclose, 
> copy, distribute, disseminate or take any action in reliance on it. 
> 
> If you have received this message in error please inform us 
> and delete it. 
> Should you wish to communicate with us by e-mail we cannot 
> guarantee the security 
> of any data outside our own computer systems. 
> 
> For the protection of our systems and staff, incoming and outgoing 
> emails are automatically scanned for viruses and content. 
> 
> 
> 
> 
> 
> -------------------------------------------------------
> This SF.Net email is sponsored by xPML, a groundbreaking 
> scripting language
> that extends applications into web and mobile media. Attend 
> the live webcast
> and join the prime developer group breaking into this new 
> coding territory!
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&;
> dat=121642
> _______________________________________________
> iText-questions mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> 


-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid0944&bid$1720&dat1642
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to