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

Free Support Forum - aspose.com

Doc to HTML - Inline font causes trouble

Dear Support ,

While Converting my doc to html using Aspose java , Default font size , family are all added inline.When I take this for editing to a WYSIWYG editor , I have trouble. When I select the content below content and and make it a heading
With regard to point 6© above, WIPO should assist in the development of model

it becomes.

With regard to point 6© above, WIPO should assist in the development of model

So heading can never be applied to my selected text in my WYSIWYG editor as font governs.

I need to have an option so that aspose output does add default text styles everywhere in the resulting html.


Thank you for your inquiry.
Headings in HTML (H1H6) are sort of paragraphs. Aspose.Words outputs paragraphs having styles Heading 1Heading 6 as H1H6 and all other paragraphs as P tags. Paragraph formatting (indents, alignment etc.) is output on paragraph nodes and font formatting (size, weight, color etc.) on SPAN nodes. That’s how Aspose.Words currently exports HTML. What do you mean under default text styles? Can you bring a sample what output you’d like to have and explain why?

Let me explain what I meant by default text styles.

I have a document and all over the document the font is say Arial and only in few places I have used verdana font.

And this document when converted to html , it will be good if you place Arial as font for the body and span with verdana font near the applicable text segments.

Now aspose places span with Arial for every text segment in the document which leads to all sorts of trouble in WYSIWYG editing.

Hope this is clear.

Is their an API to get the default font the document?.


Would you please provide a document showing up this issue?
Please clarify what you mean under default document font. Most probably you should access font properties of Normal style to achieve this.