Convert pdf to word missing chars

I have this pdf file and I trying to convert it to doc or docx format. When I tried web interface its success but when I try on java it is not success.asd.gif (77.5 KB)

docx.gif (56.7 KB)

@drsnkrt

It looks like you are using trial version of the API. Please apply a free 30-days temporary license in order to remove the restrictions and convert the file. In case issue still persists, please share your sample PDF with us so that we can test the scenario in our environment and address it accordingly.

Hi
I have got Temporary license and add pom this.

<repository>
        <id>aspose-maven-repository</id>
        <url>https://repository.aspose.com/repo/</url>
    </repository>

  <dependency>
        <groupId>com.aspose</groupId>
        <artifactId>aspose-pdf</artifactId>
        <version>23.7</version>
    </dependency>

And my java code:

Locale.setDefault(new Locale(“en-us”));
License license = new License();

        license.setLicense("/Users/dk/Desktop/aspose/Aspose.PDFforJava.lic");

        Document pdfDocument = new Document("src/main/java/invoice.pdf");

        DocSaveOptions saveOptions = new DocSaveOptions();
        saveOptions.setFormat(DocSaveOptions.DocFormat.DocX);
        saveOptions.setMode(DocSaveOptions.RecognitionMode.Flow);
        saveOptions.setRecognizeBullets(true);
        pdfDocument.save("src/main/java/invoice.docx", saveOptions);

But I have same result
And this is my pdf file
https://drive.google.com/file/d/1pFG_kdUn-eIGoBxOqHTOF34snP_QxbUf/view?usp=sharing

hi answer is above

@dk53, @drsnkrt

We were not able to download the file. Can you please share a public access link so that we can test the case and address it accordingly?

I edited shared properties, u can download now.
https://drive.google.com/file/d/1pFG_kdUn-eIGoBxOqHTOF34snP_QxbUf/view?usp=sharing

@asad.ali here we go

@asad.ali btw for this file other extension types are fail like docx(pptx,xlsx)

@dk53

Please check the attached PDF that we obtained in our environment using Aspose.PDF for Java 23.7 and below code snippet:

Document doc = new Document(dataDir + "invoice.pdf");
DocSaveOptions saveOption = new DocSaveOptions();
saveOption.setMode(DocSaveOptions.RecognitionMode.Flow);
saveOption.setFormat(DocSaveOptions.DocFormat.DocX);
saveOption.setRecognizeBullets(true);
doc.save(dataDir + "invoice.docx", saveOption);

invoice.docx (28.3 KB)

Can you please check it and let us know if it is showing correctly at your end?

Hi again @asad.ali

This document is so good but I can’t convert like this

I have a mac m1
Using Jdk 11

my pom

com.aspose
aspose-pdf
23.7

Java code actually same, but I can’t get same result.

@drsnkrt

It looks like essential Windows fonts are not installed in your system. Can you please try to install all Windows fonts in your system. In case issue still persists, please share the output DOCX with us that you obtain in your environment. We will try to further assist you accordingly.