Quoting Paulo Soares <[EMAIL PROTECTED]>:

> > 3. iText support xml transformation to pdf. Do we need to provide xslt
> for
> > it? Is it possible to construct the xml file in memory and pass the data
> > stream for pdf construction?
> 
> I'll leave this one for Bruno.

XSLT:
If you need XSLTs depends on the original XMLs you have.
In my own projects I was able to define the DTD/schema of
the XML myself, so I worked with tags that could easily be
mapped to iText tags.
For instance I had a tag <studentname /> in a study contract
and I mapped this tag to a Chunk with the name of a student
coming from our database.
If you already have existing XMLs, a translation can be
necessary. Especially if you have content in attributes.
iText can't do anything with attributes.

XML FILE IN MEMORY:
That's exactly what I do: I have an XML file that is read
from disk and I parse it twice: first to replace a tag
<courses /> with a table containing all the courses of
a student in a certain year. The result is an XML file
that is kept only in memory. Then I pass this XML through
a custom SAXiTextHandler that creates the PDF.

HTH,
Bruno


-------------------------------------------------------
The SF.Net email is sponsored by EclipseCon 2004
Premiere Conference on Open Tools Development and Integration
See the breadth of Eclipse activity. February 3-5 in Anaheim, CA.
http://www.eclipsecon.org/osdn
_______________________________________________
iText-questions mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/itext-questions

Reply via email to