Pdf rendition is not getting generating like word document

@rnara Unfortunately, There are no other recommendations then provided above. To sum them up to get the correct rendering on my side I made the following actions:

  1. Provided fonts used in the document.
  2. Enabled open type features.

Used the following code and the latest version of Aspose.Words for Java:

// Open a document
Document doc = new Document("in.docx");

// When text shaper factory is set, layout starts to use OpenType features.
// An Instance property returns static BasicTextShaperCache object wrapping HarfBuzzTextShaperFactory
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());

// Render the document to PDF format
doc.save("out.pdf");

Hi @alexey.noskov ,
Can you please share Language & Region settings from the environment where the issue is not reproducible?
Thanks,
Krishna

@rnara I have English US locale set on my working machine.

Hi @alexey.noskov ,
I am also having same locale but still not getting expected output file.
I have tried everything suggested but nothing worked.
Any way we can progress on this?

Thanks,
Krishna

@rnara Please attach the problematic input and output produced on your side. We will recheck your documents once again.

Hi @alexey.noskov,
I have attached the zip below which includes both input and output file.

files.zip (98.6 KB)

Thanks,
Krishna

@rnara Thank you for additional information. Unfortunately, the problem is still not reproducible on my side.
MS Word: out.pdf (61.1 KB)
Aspose.Words for Java 25.3: out_java.pdf (64.5 KB)

You are using 25.1 version of Aspose.Words. But even with this version the output is correct on my side:

Aspose.Words for Java 25.1: out_java_25.1.pdf (64.5 KB)

Hi @alexey.noskov ,
What more information you can provide on this to get to the root cause of the issue.
Can you please share details on OS level.
Thanks,
Krishna

@rnara I tested conversion on Windows 10. Perhaps you can create Dokerfile that will emulate you problematic environment. We will test with it on our side and let you know the result.

Hi @alexey.noskov ,
We are not using docker environment, as we also have tested this on Windows only.
Thanks,
Krishna

@rnara Unfortunately, I d not have any more ideas how to reproduce the problem on our side or what might be the reason of the problem on your side.

Hi @alexey.noskov ,
Can you please share complete OS details along with exact java version used?
Thanks,
Krishna

@rnara I tested conversion on Windows 10, Java: openjdk version “11.0.15” 2022-04-19 LTS.

@alexey.noskov,
We tried the conversion on Window 10, OpenJDK version “11.0.15”.
This issue is still reproducible.
Can you please share the complete source code that is used for conversion?

Regards,
Pavan

@rnara The following code was used for testing:

// Open a document
Document doc = new Document("in.docx");

// When text shaper factory is set, layout starts to use OpenType features.
// An Instance property returns static BasicTextShaperCache object wrapping HarfBuzzTextShaperFactory
doc.getLayoutOptions().setTextShaperFactory(com.aspose.words.shaping.harfbuzz.HarfBuzzTextShaperFactory.getInstance());

// Render the document to PDF format
doc.save("out.pdf");

@alexey.noskov ,
We tried the conversion with this code. It didn’t work.
Implemented the below code change as you suggested in the below comment.
https://forum.aspose.com/t/pdf-rendition-is-not-getting-generating-like-word-document/308458/9?u=rnara
It is still not working.

Can you please zip the complete source code and share it here ?
So that, we can run the same code in our environment.

Regards,
Pavan

@rnara Here is the test project: TestConversion.zip (6.2 KB)

@alexey.noskov,
Can you please provide the below fonts versions installed in your environment?

  1. Simplified Arabic Bold
  2. Simplified Arabic

Regards,
Pavan

@rnara Version of these fonts is 6.98:
Simplified Arabic.zip (268.0 KB)