That's one of the problems you may be up against, page rotation.

The other problem is:  The bottom left corner isn't required to be 0,0.  It is 
perfectly legal (though quite strange) to build a page with it's lower left 
corner at 200,200, or -100,0, or whatever.  Also remember that the visible page 
is defined by the page's CROP BOX, not the media box.  These values can differ. 
 Also, there might not BE a crop box, in which case you can use the media box.

So if you're expecting the visible lower left corner to be 0,0, you could 
easily be drawing off the visible page area.  Throw in rotation, and you might 
end up drawing your content no where near where you wanted it.

--Mark Storer 
  Senior Software Engineer 
  Cardiff.com

#include <disclaimer> 
typedef std::Disclaimer<Cardiff> DisCard; 



> -----Original Message-----
> From: [EMAIL PROTECTED]
> [mailto:[EMAIL PROTECTED] Behalf Of
> Tobias Meier
> Sent: Tuesday, July 24, 2007 7:27 AM
> To: Post all your questions about iText here
> Subject: Re: [iText-questions] PfdStamper
> 
> 
> Hi!
> 
> In my case the following worked:
> 
> reader.getPageSizeWithRotation(pageNumber).getWidth();
> reader.getPageSizeWithRotation(pageNumber).getHeight();
> 
> regards,
> Tobias
> > Hi,
> >
> > Thanks for the reply.
> >
> > Yes I am using the PdfStamper. As I said the code works with most of
> > the
> > files. So I am hoping there is nothing wrong with the way I am doing
> > it.
> > I have followed the example given in the Samples section of 
> the itext
> > website.
> >
> > Also the PDF is valid. It is just a scanned page.
> >
> > You mentioned about "adding content outside the
> > visible page area". Now I am calculating the X and Y 
> coordinates based
> > on
> > the "Rectangle.getHeight()" and "Rectangle.getWidth()" values.
> >
> > How can I find out if I am ""adding content outside the
> > visible page area" ?
> >
> > Ashwini Sawant
> >
> > [EMAIL PROTECTED]
> >
> > -----Original Message-----
> > From: Bruno Lowagie (iText) [mailto:[EMAIL PROTECTED]
> > Sent: Tuesday, July 24, 2007 7:44 AM
> > To: [EMAIL PROTECTED]; Post all your questions about iText
> > here
> > Subject: PfdStamper
> >
> > Hello,
> >
> > you have posted this question on the itext.ugent.be as a comment
> > to an unrelated FAQ entry. Please don't do this.
> > Please use the proper way to post questions as explained on:
> > http://itext.ugent.be/info/contact.php
> > I am forwarding your question to the mailing list:
> >
> > <quote>
> > We are using itext 2.0.4 to add a stamp (this is just a text string)
> > (over content) to existing scanned PDF files.
> > It works for most of them. But for a few documents it just does not
> > work.
> > Following are some of the properties as we see from within Adobe
> > Acrobat
> > for the non-working documents.
> >
> > PDF Producer: PDFScanLib v1.2.2 in Adobe Acrobat 7.0.8
> > Page Size: 8.53 X 11.00 in
> >
> > I am not sure if page size has anything to do with it (or 
> does it??!!)
> > since the X and Y coordinates are being calculated based on 
> the height
> > and width of the Rectangle. We have also produced documents of other
> > sizes and other combinations of properties.
> >
> > But this particular specification (PDF Producer) seems to be the
> > common
> > one amongst the documents that fail.
> >
> > My question is: Is there any limitation with itext to add 
> content (in
> > our case over content) for PDFs created with this particular PDF
> > Producer ??
> > </quote>
> >
> > Answer: iText doesn't care about the producer that was used to
> > create the PDF; adding content with PdfStamper should work with
> > any PDF that was properly created.
> > Maybe the problem lies with the PDF; is it a valid PDF file?
> > Or with the way you try adding content; are you using PdfStamper?
> >
> > This kind of problem was reported only once before, by somebody
> > who didn't understand that he was adding content outside the
> > visible page area.
> >
> > Please do not reply to me personally, use the mailing list address
> > if you have any further questions.
> > 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
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/itext-questions
> Buy the iText book: http://itext.ugent.be/itext-in-action/
> 


--Mark Storer

AKA Sheriff Lucas the Lost
       
---------------------------------
Get the free Yahoo! toolbar and rest assured with the added security of spyware 
protection. 
-------------------------------------------------------------------------
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
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/

Reply via email to