Free Support Forum -

Convert ppt to Docx

  1. Convert ppt to docx. kindly provide some suggestions.
    2)Convert ppt to pdf then convert pdf to docx by using streams only. while passing inputstream for converting pdf to docx, the output is not generated properly. Give some solutions for saving the Docx using outputstream.
    Note :: pdf should be passed as inputstream and docx should be saved as outputstream


To ensure a timely and accurate response, please attach the following resources here for testing:

  • Your input PPT document.
  • Please attach the output Word file that shows the undesired behavior.
  • Please attach the expected output Word file that shows the desired behavior.
  • Please create a simple application ( source code without compilation errors ) that helps us to reproduce your problem on our end and attach it here for testing.

As soon as you get these pieces of information ready, we will start investigation into your issue and provide you more information. Thanks for your cooperation.

PS: To attach these resources, please zip and upload them. (1.1 MB)
I have shared the files, kindly look into it and provide some solutions.


Thanks for sharing the documents and code. We have converted the shared PPT to PDF and not found found any issue with output. We are investigating your issue regarding PDF to Word conversion and will get back to you soon.


We tested the scenario using Aspose.PDF for Java 20.10 and obtained attached output with below code snippet:

String base64Image = new String(java.nio.file.Files.readAllBytes(java.nio.file.Paths.get(dataDir + "test.txt")));
ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
ByteArrayInputStream inputStream = decoder(base64Image);
try {
 com.aspose.slides.Presentation pres = new com.aspose.slides.Presentation(inputStream);, com.aspose.slides.SaveFormat.Pdf);
 inputStream = new ByteArrayInputStream(outputStream.toByteArray());
 Document doc = new Document(inputStream);
 DocSaveOptions myoption = new DocSaveOptions();
 myoption.setAddReturnToLineEnd(false);, myoption);
 try(OutputStream stream = new FileOutputStream(dataDir + "finaloutput.docx")) {
} catch (Exception e)
} (376.1 KB)

We have noticed that MS Word tries to recover the content of this file when we tried to open it and after recovering, the file seemed fine. However, would you please confirm if you are facing similar issue at your side or is there any other issue? We will further proceed to assist you accordingly.

Once Ms word recovers the output it working fine but i need to save it again. Is there any other ways to get the direct output without having these errors ??


Thanks for confirming about the issue. We have generated a ticket as PDFJAVA-39944 in our issue tracking system for the sake of investigation. We will look into details of the issue and let you know as soon as it is resolved. Please be patient and spare us some time.

We are sorry for the inconvenience.