Inserting "wrong" HTML

Hello guys,

we purchased Aspose a few weeks ago and are happy so far. We now have a problem in our production environment. I need to insert HTML into my document. Due to another bug in our WYSIWYG editor I get HTML without a font tag. That’s a real problem for us. So I need to change the font and the font size for the text I insert via HTML. Because I can’t fix the HTML I thought it would be a great thing that I can do with Aspose.
So what I did:

  • Create a temp Document - Insert the “wrong” HTML into that document
  • Iterate over the Runs and fix font and font size

So far no problems. The text looks good. Now I need to insert that good looking text into my document. I’ve looked through several code examples here on the forums, but none works for me. The problem is that I’m not always at a beginning of a paragraph. So I would need to insert another paragraph to insert these documents. This doesn’t work for us because this ends in unneeded line breaks.

Do you have any idea how you can help me? I just need to resize the font of the HTML I inserted!

Best Regards
Jan Thewes

Thanks for your inquiry. I think, you can use the code provided here to avoid unnecessary paragraph breaks after inserting a document:
Hope this helps. Please let me know if you need more assistance, I will be glad to help you.
Best regards,