I understand, but how exactly can I find these offsets?
Paulo Soares wrote: > > > ----- Original Message ----- > From: "jrocker" <[EMAIL PROTECTED]> > To: <[email protected]> > Sent: Thursday, March 15, 2007 6:59 PM > Subject: [iText-questions] Footer issue > > >> >> Hi, >> The following code prints text on the bottom of the pdf. It works for 90% >> of >> the documents. > > Thae other 10% have different page dimensions, offsets or cropboxes. You > have to take that into account. > > Paulo > >> But some docs fai(docs with pagesize.top=1224)l. Any help would be great >> >> PdfReader reader = new PdfReader(data); >> PdfStamper stamp = new PdfStamper(reader, new >> FileOutputStream(outputFileName)); >> PdfContentByte cByte; >> >> cByte = stamp.getOverContent(i); >> cByte.beginText(); >> cByte.setTextMatrix(30, 30); >> cByte.setFontAndSize(bf, 10); >> float ht = reader.getPageSize(i).height(); >> ht = (float) (.056*ht) ; >> cByte.showTextAligned(PdfContentByte.ALIGN_CENTER, showText, width / 2, >> ht, >> 0); >> >> cByte.endText(); >> stamp.close(); >> >> Thanks! >> -- >> View this message in context: >> http://www.nabble.com/Footer-issue-tf3410266.html#a9501253 >> Sent from the iText - General mailing list archive at Nabble.com. >> >> >> ------------------------------------------------------------------------- >> 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 >> [email protected] >> https://lists.sourceforge.net/lists/listinfo/itext-questions >> Buy the iText book: http://itext.ugent.be/itext-in-action/ > > > ------------------------------------------------------------------------- > 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 > [email protected] > https://lists.sourceforge.net/lists/listinfo/itext-questions > Buy the iText book: http://itext.ugent.be/itext-in-action/ > > -- View this message in context: http://www.nabble.com/Footer-issue-tf3410266.html#a9514962 Sent from the iText - General mailing list archive at Nabble.com. ------------------------------------------------------------------------- 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 [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://itext.ugent.be/itext-in-action/
