Word to PDF conversion in java with multilingual support

I am trying to convert docx( contains tamil and hindi languages) to pdf. But result is not getting as expected and also getting watermark in pdf. Pls advice in this.refer the attachment .

@rajiv1822

Looks like the query is related to Aspose.Words, we are moving it to respective category where you will be assisted shortly.

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

<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>24.9</version>
    <classifier>jdk17</classifier>
</dependency>
<dependency>
    <groupId>com.aspose</groupId>
    <artifactId>aspose-words</artifactId>
    <version>24.9</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/

If this does not help, please attach your input and output documents here for testing? We will check conversion on our side and provide you more information.

Regarding the watermark, it is added because you are using Aspose.Words in evaluation mode. In evaluation mode Aspose.Words has only two limitations: it limits the maximum size of the processed document to several hundred of paragraphs and injects an evaluation watermark into the document. If you would like to test Aspose.Words without evaluation version limitations, you can request a free 30-days temporary license . Please see our documentation to learn more about licensing:
https://docs.aspose.com/words/java/licensing/

It working fine now. Thank you @alexey.noskov.

1 Like