Cambodian language

Hi team,
We want to generate below pdf through aspose onPremise.

First we tried converting this pdf to docx using aspose on cloud but this docx did not render properly it resulted in different font and font size.

Could you give us the right docx file and also what fonts to be uploaded to render this doc to pdf correctly

get the word file by converting this pdf correctly.

67004004303800-IIN (1).pdf (131.7 KB)

the word file we got from aspose pdf to docx seems to have misaligned font size.
67004004303800-IIN+(1).docx (112.7 KB)

@KarthikRamneti The following fonts used in your document are not available on my side:

  • ‘HCJKAA+KhmerUI,Bold’
  • ‘LDCABB+KhmerUI’
  • ‘WVRHOS+Tahoma’

The fonts are required to build document layout. If Aspose.Words cannot find the font used in the document, the font is substituted. This might lead into fonts mismatch and document layout differences due to the different fonts metrics. You can implement IWarningCallback to get notifications when font substitution is performed.
Please see our documentation to learn where Aspose.Words looks for fonts:
https://docs.aspose.com/words/net/specifying-truetype-fonts-location/

The mentioned fonts are from the pdf or docx?

We want to convert the docx file to pdf file, we have the output pdf file

for the input we converted the pdf to docx using aspose, where only alignment issues are there

then we converted the obtained docx to pdf, the pdf is not rendered correctly boxes are coming

So what fonts needs to be added for the correct font rendering?

@KarthikRamneti

These are the fonts used in your document, but not available on my side. They are substituted upon rendering the document to PDF. As I have mentioned you can implement IWarningCallback to get notifications when font substitution is performed. These warnings are shown when Aspose.Words cannot find fonts used in the MS Word document.

I am afraid it is impossible to retain eh original PDF document layout after PDF->DOCX-PDF roundtrip. You should note, Aspose.Words is designed to work with MS Word documents. MS Word documents are flow documents and they have structure very similar to Aspose.Words Document Object Model. On the other hand PDF documents are fixed page format documents . While converting PDF document Fixed Page Document structure is converted into the Flow Document Object Model. Unfortunately, such conversion does not guaranty 100% fidelity. When the produced DOCX document is converted to back to PDF Aspose.Words builds the document layout to generate the document in Fixed Page format.

I have tried converting your DOCX document to PDF using MS Word, and the result is also not perfect:
ms.pdf (350.2 KB)