Russian dates are not working

Hi Team,

We are planning to convert this word document
test.docx (12.9 KB)

to pdf but after conversion date coming with boxes. below is our output pdf file
test.pdf (42.1 KB)

Below is the issue

above texts in word converted like below texts in pdf

Please find the below attached app.
App.zip (8.7 MB)

You can try docker-compose up to reproduce the issue
FYI: I have all necessary fonts in Font folder inside app, this will get installed as part of docker compose up

@sarathisathish90 Unfortunately, I cannot reproduce the problem on my side.
Here is the output produced by your application on my side: SathishTest.pdf (107.0 KB)

Also, it is not quite clear why you use Aspose.PDF to load and save PDF document produced by Aspose.Words. You can simply use the following code to convert document to PDF:

Aspose.Words.Document doc = new Aspose.Words.Document(@"C:\Temp\in.docx");
doc.Save(@"C:\Temp\out.pdf");

Hi @alexey.noskov ,

Thanks for your reply. I tried the code which you shared please find the below app
App.zip (8.9 MB)

Still, I am facing the same issue.

FYI: When I run the app Windows environment it is working as expected. The issue happens when I run the app in alpine Linux environment using docker. So could you also please try docker compose up and test it.

The reason could be I may miss some fonts, or some fonts need from aspose.

Thanks,
Sathish Govindan

@sarathisathish90 Thank you for additional information. I managed to reproduce the problem on my side. To get the expected output it is required to enable Open Type Features using HarfBuzz. To make it work in Alpine Linux you should install harfbuzz-dev package. Here are additional package that are installed in a clean Alpine Linux container to make Aspose.Words to work:

RUN apk add --no-cache harfbuzz-dev
RUN apk add --no-cache icu-libs

Here is the output PDF produced the the following simple code:

Document doc = new Document(folder+"in.docx");
doc.LayoutOptions.TextShaperFactory = Aspose.Words.Shaping.HarfBuzz.HarfBuzzTextShaperFactory.Instance;
doc.Save(folder + @"out_HarfBuzz.pdf");

out_HarfBuzz.pdf (10.5 KB)

Hi @alexey.noskov ,

Thanks a lot, we fixed our issue with your answers.

Thanks,
Sathish Govindan

1 Like