InsertHtml and Arabic support

Hello,

I am evaluating the ability of Aspose to handle RTL languages and in particular Arabic. I have a few questions:

  1. Does the InsertHtml function handle the dir attribute on elements and correctly display RTL text?
  2. Is there an easy way to completely mirror a Word document using the api? or will I just have to construct the document backwards?
  3. Does the Word to Pdf conversion process handle Bidi and RTL text from the Word document?
  4. Does the Pdf printing process have any snags with Bidi and RTL text? or will it print exactly what is generated with the Pdf?

Thanks!

Hi
Thanks for your request.

  1. No, DIR attribute is ignored during HTML import. RTL text will be converted to normal text.
  2. Yes, you should use Bidi property. Please see the following link to learn how to insert RTL text into the document.
    https://reference.aspose.com/words/net/aspose.words/font/bidi/
    Also PageSetup and ParagraphFormat classes have the same attribute
    https://reference.aspose.com/words/net/aspose.words/pagesetup/bidi/
    https://reference.aspose.com/words/net/aspose.words/paragraphformat/bidi/
    So if you set these attributes you will have RTL section and RTL paragraph.
  3. Right-to-left attribute will be lost during converting DOC to PDF.
  4. You should ask this question in Aspose.Pdf forum
    Best regards.

Thanks Alexey for your quick response.

  1. Are there any plans to support this attribute on InsertHtml? If so, could I get a timeframe? If not, could an enhancement request be put in for it?

  2. Great I’ll give these a shot. If it detects English characters mixed in with RTL will it render those left to right?

  3. Do you know if I construct the Pdf directly whether the Pdf object model has the RTL capability? If not, i’ll ask on the Pdf forum.

  4. Will do.

Thanks!

Hi
Thanks for your inquiry.

  1. This is known issue #390 in our defect database. But I can’t provide you any estimate at the moment.
  2. There is another issue regarding this.
    Issue #1131 - Update DocumentBuilder.Write method with correct handling of runs containing mixed rtl/ltr text.
  3. Please ask this question in Aspose.Pdf forum.
    Best regards.

Hi Alexey,

Interestingly enough, today I also have a need to use the InsertHTML method with Arabic, and need some way to enabled Bidi on the inserted text. Just wanted to throw my hat in for requesting support for this, if possible.

Mike

Hi
Thanks for your request. We are working on improving our HTML import module. But I can’t give you any estimate when RTL will be supported in HTML. I will notify you as soon as it is fixed.
Best regards.

The issues you have found earlier (filed as 390) have been fixed in this update.