Hi
I use 'Arial Unicode MS' with 'Identity-H' encoding to convert Html to pdf.
Document document = new Document();
FontFactory.register("C:\\Windows\\fonts\\arialuni.ttf");
StyleSheet st = new StyleSheet();
st.loadTagStyle("body", "face", "Arial Unicode MS");
st.loadTagStyle("body", "encoding", "Identity-H");
st.loadTagStyle("body", "leading", "12,0");
document.open();
ArrayList p = HTMLWorker.parseToList(stringReader, st);
for (int k = 0; k < p.size(); ++k) {
document.add((Element)p.get(k));
}
document.close();
In some cases, If the html has font tag and style tag with font (eg. <span
style="FONT-WEIGHT: bold; COLOR: rgb(0,153,204)">), I get the following
exception.
ExceptionConverter: java.io.UnsupportedEncodingException: Identity-H
Also when I convert the html with image, the image fills the page widthwise and
is truncated on the sides. what should i include for images?
Thanks
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com -------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems? Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >> http://get.splunk.com/
_______________________________________________
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/