Christopher M Madison wrote: > The watermark text is applied > to the document, but WAY off of the page.
OK, let's have a look. > Here is what Adobe Designer (xml view) has for the first character is the > watermark: > > <draw name="T01" x="3.842in" y="320.898in" minW="0.312in" > minH="0.312in"> Not sure where this XML snippet comes from (not from iText), but in this case x = 276.624 points y = 23104.656 points > The y value is at 320.898 inches! This is WAY OFF. Not necessarily. > I am using the PDFStamper method of (based on the online example) to > watermark the document. > > Using the iText API I've determined that the pages are LEGAL size. > Further, I found this to be interesting (from PDFReader.getPageSize(i)): getPageSizeWithRotation also gives you the rotation, but that's not important here. > llx = 0.0 > lly = 22584.0 > urx = 612.0 > ury = 23592.0 > > ury - lly = 1008!!! That's page size LEGAL: 612 x 1008 points. When iText creates a page with this size: llx = 0.0 lly = 0.0 urx = 612.0 ury = 1008.0 Apparently, the Pdf tool you have been using, has an offset of 22584.0 points for the Y value. You want to place your watermark at position y = 23104.656 - 22584.0 = 520.656 points which is 7.231 inches from the bottom. > How can I adjust the lly and ury of the document? Or how can I move the > text onto the page? I'm not able to answer this question right away, I'm just thinking along with you. It would be interesting to have the code snippet you are using to see what goes wrong. br, Bruno ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys - and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ iText-questions mailing list iText-questions@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/