We're sorry Aspose doesn't work properply without JavaScript enabled.

Free Support Forum - aspose.com

Displaying wrong font while inserting html

Hi there,

I am inserting following HTML into document using InsertHTML() method, but i am not sure why the font is showing differently in word compared to font in browser.

This is one of the sample html only, but in our server, it was happeing in somany areas, Could you pls help me out on this, Is there any other way to insert html into document other than InsertHTML() method? PFA for screen shot for difference b/w browser text and word text.

ANSI/ISA S88.01 describes equipment and procedural components of a batch process design using a standardized terminology.















 Units  Sequences
 Break Bag(s)  Unclarified Harvest Collection and Cooling - B
 Harvest Hold Bag(s)   Unclarified Harvest Collection and Cooling - H
 Collection Tote Changeout

Thanks,

Hi

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

Thanks for your request. I managed to reproduce the problem on my side. Your request has been linked to the appropriate issue. You will be notified as soon as it is fixed.

Best regards,

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

Thank you for your patience.

Table in the source HTML fragment is enclosed to the element. Normally is used to emphasize some text but not tables. It is one of the phrasal elements:

http://www.w3.org/TR/REC-html40/struct/text.html#edef-EM

HTML visual agents (VA) such as browsers can render emphasized elements differently. The most common implementation is making emphasized text italic. But regarding tables nothing is given as recommendation. As we see, Internet Explorer leaves such a table as if it wasn’t emphasized.

Since is intended for using as inline element that’s not clear what behavior to expect and whether this HTML code is even correct. Inline elements probably shouldn’t contain tables at all. Please refer to the typical and recommended default style sheet for HTML:

http://www.w3.org/TR/CSS21/sample.html

As a workaround you can just remove that encloses the table.

Regards,

Hello there,

Thanks for your response, but unfortunately it was not happening in all the cases ( might be html string doesn't having tags) and this html content is coming from database, some times this html content may be bit complex.

How could i differentiate this tags b/w different kinds of html string? and this was not happening in the IE browser. Is it possible to do anything from your component side?

Thanks,

Hi

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

Thanks for your request. I think, you can use regular expressions to pre-process your HTML and remove EM tags. For example, you can use code like the following:

string html = File.ReadAllText(@"Test001\test.html");

Regex regex = new Regex("]*>\\s*(]*>.*)\\s*", RegexOptions.Singleline | RegexOptions.IgnoreCase);

html = regex.Replace(html, "$1");

builder.InsertHtml(html);

Hope this helps.

Best regards,

The issues you have found earlier (filed as WORDSNET-2759) have been fixed in this .NET update and this Java update.


This message was posted using Notification2Forum from Downloads module by aspose.notifier.