hi all,
is <span style="..."> supported by iText ?
i am using HTMLWorker and my html contains <span style="...">, my problem
is the code inside that tag is not being displayed (eg. underlined text,
highlighted text, indented list).
below is my code snippets:
String userHTML = "<p><u><b><span style=\"font-size: medium\"><span
style=\"font-family: Arial\">2008
聖誕聚餐</span></span></b></u></p>";
FontFactory.registerDirectories();
StyleSheet st = new StyleSheet();
st.loadTagStyle("body", "face", "Arial Unicode MS");
st.loadTagStyle("body", "encoding", BaseFont.IDENTITY_H);
st.loadTagStyle("body", "leading", "12,0");
StringReader reader = new StringReader(userHTML);
PdfWriter writer = PdfWriter.getInstance(document,
new FileOutputStream(fileName));
document.open();
ArrayList p = HTMLWorker.parseToList(reader, st);
for (int k = 0; k < p.size(); ++k) {
Element e = (Element)p.get(k);
document.add(e);
}
document.close();
Thank you.
---------------------------------
Be a better friend, newshound, and know-it-all with Yahoo! Mobile. Try it now.-------------------------------------------------------------------------
SF.Net email is sponsored by:
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services
for just about anything Open Source.
http://ad.doubleclick.net/clk;164216239;13503038;w?http://sf.net/marketplace
_______________________________________________
iText-questions mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/itext-questions
Buy the iText book: http://itext.ugent.be/itext-in-action/