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

Free Support Forum - aspose.com

Convert HTML/Word Files with Arabic Text to PDF using Java | Render Arabic in Right-to-Left Text Direction

Hi,

I’m trying to convert html to pdf using aspose.word 19.10.
targeted html is a chart so i’m getting the inner html for this chart and create an aspose.words.Document from this html and use document builder to save it as a pdf.

Issue :
this chart contains an svg tag that contains an arabic text “عدد الحصص”, so when converting to pdf the text appears “ص ص ح ل ا د د ع”.
I tried to set “DocumentDirection.RIGHT_TO_LEFT” and “bidi” to true but it didn’t work.
This text inside a text tag within the svg tag.

Thanks.

@moath_ibrahim,

Please ZIP and attach the following resources here for testing:

  • Your simplified input Word document
  • The HTML file/string that you are inserting in Word document
  • Aspose.Words for Java 20.9 generated output DOCX file showing the undesired behavior
  • Your expected DOCX file showing the desired output. You can create this document by using MS Word.
  • Piece of source code that you are using.

As soon as you get these pieces of information ready, we will start investigation into your particular scenario/issue and provide you more information.

Hi @awais.hafeez
I’m not generating a docx or word document, just passing the html input as an input stream and use the document builder to save it as a PDF.
Chart-Files.zip (2.1 KB)

@moath_ibrahim,

We tested the scenario and have managed to reproduce the same problem on our end. For the sake of correction, we have logged this problem in our issue tracking system. The ID of this issue is WORDSNET-21279. We will further look into the details of this problem and will keep you updated on the status of correction. We apologize for your inconvenience.

Hi @awais.hafeez,

Could you please update me with the status of this issue.

Thanks.

@moath_ibrahim,

I am afraid, your issue is not resolved yet. We are currently doing analysis of this issue to determine the root cause. We will inform you here as soon as this issue will get resolved in future. We apologize for any inconvenience.

Hi @awais.hafeez,

Could you please update me with the status of this issue.
Note : I have a licensed jar with version 18.5.

Thanks

@moath_ibrahim,

WORDSNET-21279 is still in Analysis stage. Please spare us some time for the investigation of this issue. We will notify you here when this will get resolved in future. We apologize for any inconvenience.

The issues you have found earlier (filed as WORDSNET-21279) have been fixed in this Aspose.Words for Java 22.7 update also available on Maven.