Word to pdf Arabic format is not conervted properly

Dears,
Using (aspose-words-20.11 , aspose-words-21.11) to convert word file that contains Arabic letters to pdf file, It doesn’t view the Arabic format properly after the conversion.
Please check the attached 2 files which are word file before conversion and pdf file after conversion.

arabic letters after aspose conversion.PDF (58.3 KB)
arabic letters format sample .docx (12.1 KB)

@m.mustafa2194,

Please 1) upgrade to the latest 21.5 version of Aspose.Words for Java, 2) Enable OpenType Features and see how it goes on your end?

The following Java code produces correct PDF output on our end (see awjava-21.5.pdf (33.6 KB)):

Document doc = new Document("C:\\temp\\check aspose arabic letters format .docx");
doc.getLayoutOptions().setTextShaperFactory(HarfBuzzTextShaperFactory.getInstance());
doc.save("C:\\Temp\\awjava-21.5.pdf");

Thanks a lot @awais.hafeez for your support,
It is working fine now.