แปลง PowerPoint เป็น Word

คุณอาจมีเหตุผลที่ต้องการแปลง PowerPoint เป็น Word การแปลง PPT เป็น DOC คุณจะได้รับประโยชน์จาก จุดแข็งของ Word ในแง่ของตัวเลือกการจัดรูปแบบและความสามารถในการพิมพ์ โดยพื้นฐานแล้ว เมื่อเอกสารของคุณอยู่ในรูปแบบ Word คุณอาจพบว่าการแก้ไขเนื้อหาหรืออัปเดตเนื้อหานั้นง่ายกว่า โดยเฉพาะอย่างยิ่งเมื่อมีข้อมูลเชิงลึกที่เป็นข้อความมากขึ้น

การแปลง PowerPoint PPT เป็น Word ใน Java

แม้ว่า Microsoft PowerPoint และ Microsoft Word จะเป็นเครื่องมือทางธุรกิจที่ได้รับความนิยมมากที่สุด แต่ก็ไม่มีโปรแกรมใดที่มีฟังก์ชันที่อำนวยความสะดวกในการแปลงทิศทางจากรูปแบบหนึ่งไปยังอีกรูปแบบหนึ่ง สิ่งต่าง ๆ แตกต่างกันโดยทางโปรแกรม ในบทความนี้ คุณจะได้เรียนรู้วิธีการแปลง PowerPoint เป็น Word ใน Java

Java APIs เพื่อแปลง PPT เป็น Word

ในการแปลงงานนำเสนอ PowerPoint เป็น Word โดยใช้โค้ด Java คุณต้องหาวิธี

  • แยกเนื้อหาของงานนำเสนอ เช่น รูปภาพ ข้อความ เป็นต้น

  • วางหรือแทรกเนื้อหาที่แยกออกมาในเอกสาร Word

ในการดำเนินการดังกล่าว คุณต้องมี API หนึ่งตัวที่สามารถจัดการงานนำเสนอ PowerPoint และอีก API หนึ่งที่ทำสิ่งเดียวกันสำหรับเอกสาร Word เพื่อดำเนินการตามที่อธิบายไว้ เราขอแนะนำให้คุณได้รับ:

  1. Aspose.Slides for Java Aspose.Slides for Java เป็น API ที่มีประสิทธิภาพสำหรับการสร้าง แก้ไข แปลง และจัดการงานนำเสนอ PowerPoint (โดยไม่ต้องใช้ Microsoft PowerPoint หรือ Office) หากต้องการติดตั้ง Aspose.Slides for Java โปรดดูที่การติดตั้ง
  2. Aspose.Words for Java Aspose.Words for Java เป็น API การประมวลผลเอกสารที่มีคุณสมบัติหลากหลายเพื่อใช้ในการสร้าง แก้ไข แปลง เรนเดอร์ และพิมพ์ไฟล์ในรูปแบบ Microsoft Word หากต้องการติดตั้ง Aspose.Words for Java โปรดดูที่การติดตั้ง

ข้อมูล: Aspose พัฒนา ตัวแปลง PowerPoint เป็น Word ฟรีที่ช่วยให้ผู้ใช้สามารถแปลงงานนำเสนอเป็นเอกสาร Word ได้อย่างรวดเร็ว ตัวแปลงนี้อาจถือเป็นการใช้งานจริงของกระบวนการ PowerPoint เป็น Word

แปลง PowerPoint เป็น Word ใน Java

  1. เพิ่ม aspose-slides-xx-jdk16.jar และ aspose-words-xx-jdk16.jar ใน CLASSPATH ของคุณ

  2. Use this code snippet to convert the PowerPoint to Word:

This Java code shows you how to convert PPT 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();
}

PPT to Word Converter - Get a Free License

If you are looking to try Aspose.Slides and Aspose.Words features without limitations, we recommend you get a free temporary license.

Conclusion

We walked you through an operation on converting PowerPoint to Word. The Java code we provided (targeting PPT to DOC) may also be used for other known PowerPoint and Word formats, which may include PPT to DOCX, PPTX to DOCX, PPTX to DOC.

To learn more about Aspose.Slides features, see our documentation. If you have questions, you can post them on our forum.

See Also

Since you know now how to convert PowerPoint to Word in Java, you may be interested in other operations where a PowerPoint presentation gets converted to files in other formats programmatically.