Aspose.Pdf loses text styles, such as bold and other font styles, during converting pdf to docx format


I am using java aspose.pdf library for converting pdf file to docx file.
But There is no font styles in generated docx file.
For example, bold texts are not converted in docx as bold, all text in docx are without font styling as they were in pdf.

Can anyone help me?


Thanks for contacting support.

Can you please share source file along with generated result so that we may further investigate to help you out. Also please share source code as well so that we may assist you in this issue.

Hi, Thank you for your response. Here is java code, input pdf and output docx files.

    ByteArrayOutputStream pdfStream = new ByteArrayOutputStream();
    // loadPdf into pdfStream
    Document pdfDocument = new Document(new ByteArrayInputStream(pdfStream.toByteArray()));, SaveFormat.DocX);

Capture-Docx.PNG (64.1 KB)
Capture-Pdf.PNG (305.5 KB)

preview.pdf (23.4 KB)
previewChangeTYpeToDocx.pdf (2.7 MB)

Here is another actual docx and pdf files. Please, change type of second file to docx and then open it. I couldn’t upload docx file and instead, I uploaded it as pdf file.

I have the same issue and look forward to a solution.


I have observed issue you mentioned and have logged it as PDFJAVA-39217 in our issue tracking system. We will further look into details of the issue and keep you posted with the status of its correction. Please be patient and spare us little time.

We are sorry for the inconvenience.

Hello, are there any updates regarding this issue?


I like to inform that issue has been created recently in our issue tracking system and in Aspose.PDF forum issues are resolved on first come first serve basis. I request for your patience and we will share good news with you soon.

Hi @adnanahmed, I noticed that the demo website doesn’t have this issue. If you can answer this question, it may help @mirian.kapanadze’s issue.


We have responded to you under your original inquiry where you may please follow up.