The text in output file display differently from output file after converting into pdf

Hi team

We have Word document which has different line wrapping after conversion into pdf. As you can see as below

original file

output file

@pootun Please try enabling open type features. You should be install the above package

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>24.7</version>
    <classifier>jdk17</classifier>
</dependency>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>24.7</version>
    <classifier>shaping-harfbuzz-plugin</classifier>
</dependency>

and modify the code as shown below:

// 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");

See more about advanced typograph features in the documentation:
https://docs.aspose.com/words/java/enable-opentype-features/

Here are output document produced by Aspose.Words and MS Word.
Aspose.Words: out_HarfBuzz.pdf (138.9 KB)
MS Word: ms.pdf (255.1 KB)

Hi team

we modified the code as suggestion but we still have the same problem. The output file you attached still has the same issue.

one of my document show differently layout from the original file as well. How to fix this?

@pootun
We have opened the following new ticket(s) in our internal issue tracking system and will deliver their fixes according to the terms mentioned in Free Support Policies.

Issue ID(s): WORDSNET-27275

You can obtain Paid Support Services if you need support on a priority basis, along with the direct access to our Paid Support management team.