[email protected] wrote: > We are trying to use the XML front end of iText to auto generate a pdf > from a xml file. > We are using the iText dtd (http://itext.sourceforge.net/itext.dtd).
Don't! That DTD is old and no longer in tune with iText. > We need to print a header and footer on each page. Do this using page events. > We need to define the header and footer in the xml. Parse the XML and declare the header and footer to the page event. > The dtd does not define this type of tags (something like header/footer). > Someone has resolved this problem, writing some special tags? There aren't any specific examples about this, but have a look at some examples involving XML. Some (relatively) more complex XML samples are: http://1t3xt.info/examples/resources/in_action/chapter06/studyprogram.xml http://1t3xt.info/examples/resources/in_action/chapter09/say_peace.xml http://1t3xt.info/examples/resources/in_action/chapter09/peace.xml http://1t3xt.info/examples/resources/in_action/chapter14/romeo_juliet.xml The resulting PDF documents look like this: http://1t3xt.info/examples/results/in_action/chapter06/studyprogram.pdf http://1t3xt.info/examples/results/in_action/chapter09/say_peace.pdf http://1t3xt.info/examples/results/in_action/chapter09/peace.pdf http://1t3xt.info/examples/results/in_action/chapter14/romeo_juliet.pdf The source code for those examples can be found here: http://1t3xt.info/examples/browse/?page=example&id=114 http://1t3xt.info/examples/browse/?page=example&id=147 http://1t3xt.info/examples/browse/?page=example&id=157 http://1t3xt.info/examples/browse/?page=example&id=230 Also look at yesterday's JavaWorld article: http://www.javaworld.com/javaworld/jw-03-2009/jw-03-write-your-own-twitter-app.html -- This answer is provided by 1T3XT BVBA http://www.1t3xt.com/ - http://www.1t3xt.info ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com _______________________________________________ iText-questions mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/itext-questions Buy the iText book: http://www.1t3xt.com/docs/book.php
