Quoting pooja sharma <[EMAIL PROTECTED]>: > I must tell you that I am not Paid for this work. I am a trainee at this > institution. I know only C and C++, but I have been assigned a project in > which coding has to be done in Java. I hava studied only core java.
OK,
> Your software has been of great help to me. Not only has it made my work
> easier but also helped me learn Java.
>
> >I can get you
> >started by writing you a demo tagmap
>
> I will be obliged if you could do that.
In attachment, you will find the following files:
Pooja.xml: I had to change some of your XML
1. to fit into a table structure.
2. because the same tag names are used in a different context.
Maybe you can use XSL to do this.
tagmapPooja.xml:
this maps your tags to iText tags.
As you see, it's pretty straightforward.
I don't understand why you kept asking for help about it.
The only difficult thing, is 'lastheaderrow' to make sure
the headerrows (0 and 1) are repeated on every page.
Pooja.java: this is almost an exact copy of Chap0703.java
Pooja.pdf: the end result
THERE ARE TWO ENHANCEMENTS YOU WILL HAVE TO CODE YOURSELF:
1. the page numbers: If I were you, I would add these in
a Page Event. This is described in Chapter 12.
2. memory issues: when you are using class Table in XML,
nothing is writing to the outputstream BEFORE you add
the Table to the document. Everything is kept in memory.
You can avoid this in different ways:
(1) split your XML up in different smaller XMLs
(2) extend SAXmyHandler and override the method that
checks the end tags. Perform a fitsPage every time
you encounter an endTag (see the fitsPage example
in the tutorial).
(1) is easy, but you will have a lot of empty space in
your document because you will not always split a page
at the end of a page. (2) is more complex, but gives
nice results.
Remark: THIS IS AN EXCEPTION: I DON'T USUALLY GIVE THIS
KIND OF FREE CONSULTANCY. THE SUBJECT 'TAGMAP PROBLEM' WAS
MISLEADING, SINCE THERE REALLY WAS NO PROBLEM. DO NOT ASK ME
FOR SIMILAR FAVORS IN THE FUTURE!
Bruno
Pooja.zip
Description: Binary data
