Free Support Forum - aspose.com

Word InsertHtml Exceptions

I'm getting following error while using InsertHtml Method for the HTML provided below. Attached file contains additional HTML Strings and Exceptions I got from Aspose.words. Please advise!

HTML:

CSA, with $10 MM unsecured threshold limit at A rating or better and 0 unsecured threshold limit if A- rated or below. There is no ratings based termination event. Hartford Fire is an occasional buyer of credit protection. It is a low exposure counterparty. The counterparty is on pre-approved status.


<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /> 

Input string was not in a correct format.

at System.Number.ParseDouble(String s, NumberStyles style, NumberFormatInfo info)
at System.Double.Parse(String s, NumberStyles style, IFormatProvider provider)
at ӓ.ө.ӵ(String ӝ)
at ӓ.ө.set_Ӕ(String ӝ)
at ӓ.ө..ctor(String cssValue)
at ӓ.Ә.set_Ӕ(String ӝ)
at ᛻.᛺.᛿(String ᛽, ParagraphFormat ᜀ)
at ᛑ.ᛐ.᛭(ۭ ہ)
at ᛑ.ᛐ.᛫(ۭ ہ, Boolean ᛢ)
at ᛑ.ᛐ.ᛣ(ۭ ہ, Boolean ᛢ)
at ᛑ.ᛐ.ᛡ(ۭ ہ, Boolean ᛢ)
at ᛑ.ᛐ.ᛞ(ۭ ہ)
at ᛑ.ᛐ.ᛞ(ۭ ہ)
at ᛑ.ᛐ.ᛟ(پ ᛠ)
at Aspose.Words.DocumentBuilder.InsertHtml(String html)
at icecapDocBuilder.DocumentEngine.ProcessTextTag(XmlNode xmlNode) in C:\dev_dotnet\icecapDocBuilder\Components\docEngine.vb:line 122

Only points (pt) are currently recognized as measurement units during HTML import.

Inches (in), centimeters (cm) and pixels (px) are not supported yet.

I have logged this to our defect base as a feature request (issue #1096). We will try to support it in our next hotfix as many users request it.

Meanwhile you can workaround by substituting not supported measurement units with points.

Use ConvertUtil class to convert between different measurement units.