Hello, I used the following exemple (I have not yet received the book).
Exemple : Part1.Chapter5.MoviesCountries1.java Exemple : Part2.Chapter6.TwoPasses.java I think you must use it if you want page 1/100. PHL. ----- Mail Original ----- De: "1T3XT BVBA" <[email protected]> À: [email protected] Envoyé: Mercredi 23 Mars 2011 13h42:37 GMT +01:00 Amsterdam / Berlin / Berne / Rome / Stockholm / Vienne Objet: Re: [iText-questions] Question about page number footers Op 23/03/2011 12:49, dwhite schreef: > Hi, I am just trying to add current page number to the footer of my document. > I followed the example from "iText in Action" Which example? Can you give me a page or listing number? > public void onOpenDocument(PdfWriter writer, Document document) { As explained in the book, the document object is an instance of PdfDocument. You're using: > document.setFooter(footer); I don't know any example in the book uses PdfDocument.setFooter(). As a matter of fact, the method setFooter() no longer exists in Document, nor in PdfDocument: http://api.itextpdf.com/com/itextpdf/text/Document.html http://api.itextpdf.com/com/itextpdf/text/pdf/PdfDocument.html You're doing something that isn't supported at all. (And that can't be found anywhere in the book.) Replace document.setFooter with a showTextAligned method (either using PdfContentByte or ColumnText), or wrap the Phrase in a ColumnText and use the go() method (allthough in your case showTextAligned() is probably better). ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php ------------------------------------------------------------------------------ Enable your software for Intel(R) Active Management Technology to meet the growing manageability and security demands of your customers. Businesses are taking advantage of Intel(R) vPro (TM) technology - will your software be a part of the solution? Download the Intel(R) Manageability Checker today! http://p.sf.net/sfu/intel-dev2devmar _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions iText(R) is a registered trademark of 1T3XT BVBA. Many questions posted to this list can (and will) be answered with a reference to the iText book: http://www.itextpdf.com/book/ Please check the keywords list before you ask for examples: http://itextpdf.com/themes/keywords.php
