You are setting the encoding for all the html and are selecting a font 
afterwards that doesn't support it. If it's not the case post the html that 
causes the problem.

Paulo

----- Original Message ----- 
From: "nsk clr" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Tuesday, November 06, 2007 12:05 AM
Subject: [iText-questions] pdf conversion from html


> 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


-------------------------------------------------------------------------
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/

Reply via email to