Convert PPT to Word in Java
Powerful cross-platform Java API for converting PowerPoint to Word using Java code without Microsoft PowerPoint or Office
Convert PowerPoint to Word using Aspose.Slides and Aspose.Words
Aspose.Slides for Java and Aspose.Words for Java are powerful Java libraries used to manipulate and convert PowerPoint presentations, Word documents, and other files. When you convert PowerPoint to Word, you are essentially moving the contents of a presentation’s slides to pages in a Word document.
Convert PowerPoint to Word in Java
You can convert PPT to Word quickly with just a few lines of code
Java code for converting PowerPoint to Word
Presentation pres = new Presentation(inputPres);
try {
Document doc = new Document();
DocumentBuilder builder = new DocumentBuilder(doc);
for (ISlide slide : pres.getSlides())
{
// generates and inserts slide image
BufferedImage bitmap = slide.getThumbnail(1, 1);
builder.insertImage(bitmap);
// inserts slide's texts
for (IShape shape : slide.getShapes())
{
if (shape instanceof AutoShape)
{
builder.writeln(((AutoShape)shape).getTextFrame().getText());
}
}
builder.insertBreak(BreakType.PAGE_BREAK);
}
doc.save(outputDoc);
} finally {
if (pres != null) pres.dispose();
}
How to convert PPT to Word
Install Aspose.Slides for Java and Aspose.Words for Java
Create an instance of the Presentation class and Doc class.
Load the PPT presentation you want to convert to Word.
Generate images and texts based on the slides’ contents.
Save the resulting Word document.
Free Online Converter
Other Supported Conversions
You can also convert PowerPoint to files in other formats