On Thu, 2003-06-26 at 10:37, Bruno Lowagie wrote:
> Kristian Du wrote:
> >I would like to implement a header and a footer and I did read your
> >previous answers. The problem is that I have no clue on how to go about
> >
> > - using PageEvents
> > - subclassing the handler and catch the specific tags
> >
> it's all in chapter 12 of the tutorial
> http://www.lowagie.com/iText/tutorial/ch12.html
> http://www.lowagie.com/iText/examples/Chap1201.java
>
> If your Header and Footer are outside the XML: use PageEvents
> See class MyPageEvents extends PdfPageEventHelper
> in the java-sample mentioned above
>
> If your Header and Footer are inside the XML: extend the Handler.
> See class MyHandler extends SAXmyHandler in the same
> java example.
OK... I have managed to get something working starting from your
example code and suggestions from Roberto Cipollini.
I am trying to have my HEADER and FOOTER tags within the same XML file
to be converted. I am using a tagmap that looks as follows:
mytagmap.xml:
--------
<tagmap>
<tag name="PdfTable" alias="HEADER" >
<attribute name="leading" value="24" />
<attribute name="size" value="12" />
<attribute name="columns" value="3" />
<attribute name="rows" value="1" />
<attribute name="style" value="bold" />
</tag>
<tag name="PdfTable" alias="FOOTER" >
<attribute name="leading" value="24" />
<attribute name="size" value="12" />
<attribute name="columns" value="3" />
<attribute name="rows" value="1" />
<attribute name="style" value="bold" />
</tag>
</tagmap>
---------
How should I go about expressing the actual HEADER and FOOTER
in the XML file? This is what I've tried, but it doesn't seem
to work:
-------
....
<paragraph>
..... some text
</paragraph>
<HEADER>
<lhead>Left</lhead>
<chead>Center</chead>
<rhead>Right</rhead>
</HEADER>
<FOOTER>
<lfoot>Left</lfoot>
<cfoot>Center</cfoot>
<rfoot>Right</rfoot>
</FOOTER>
....
-------
Any ideas?
--
Kristian
-------------------------------------------------------
This SF.Net email sponsored by: Free pre-built ASP.NET sites including
Data Reports, E-commerce, Portals, and Forums are available now.
Download today and enter to win an XBOX or Visual Studio .NET.
http://aspnet.click-url.com/go/psa00100006ave/direct;at.asp_061203_01/01
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions