Doug James wrote:
Is it possible to write a generic iText document and be able to deliver
both HTML and PDF based on the users choice? I would like to write it
once and be able to provide 2 different links one to the HTML output and
one to the PDF output.
One of the first projects that used iText, generated HTML as well as PDF:
http://aivwww.ugent.be/Studentenadministratie/Studiegids/2005/EN/FACULTY/TW/2CYC/EPCOMP/000111/INDEX.HTM
http://aivwww.ugent.be/Studentenadministratie/Studiegids/2005/EN/FACULTY/TW/2CYC/EPCOMP/000111/INFO.PDF
In this case, the HTML and PDF were generated using identical source
code (with pdfWriter.pause and pdfWriter.resume to have the 'PDF
version' link in HTML). I prefered generating the document from the
source code, because the data in the doc comes from a legacy database
that doesn't even understand SQL. So the largest part of the code deals
with database querying.
You just have to be careful what high level elements you want to use.
Not everything that is supported in PDF is supported in HTML.
br,
Bruno
-------------------------------------------------------
SF.Net email is sponsored by: Discover Easy Linux Migration Strategies
from IBM. Find simple to follow Roadmaps, straightforward articles,
informative Webcasts and more! Get everything you need to get up to
speed, fast. http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions