I am trying to convert an HTML document to PDF using iText. For the most
part, this works fine using the basic HtmlParser.parse. However, there are
several nested <ol> lists of varying types - Numerical, Uppercase Roman,
Lowercase Roman, Uppercase Alpha, Lowercase Alpha. The HTMLParser treats
each of these as numerical lists.
How can I go about parsing these lists and maintaining the type (which can
be denoted by either the CSS style "list-style-type:
upper-alpha/upper-roman/etc" OR by the deprecated <ol> attribute
"type=a/A/I/i")?
I have looked into the commercial options that have been mentioned but they
are too expensive for our needs. I have looked through the tutorial and
online documentation from the book as well as searching the email archives.
It seems that using HTMLWorker might be the best option, but I have not been
able to find an example using HTMLWorker. I am also wondering if there is a
way to override the HTML tag map class and somehow map the HTML OL tag to
multiple different iText List types based on the style attribute. Is this
possible? Or does anyone have a better suggestion for going about this?
Thanks.
-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys-and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
iText-questions mailing list
iText-questions@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/