Convert PDF to PPTX in Go

Convert PDF to PPTX

The provided Go code snippet demonstrates how to convert a PDF document into a PPTX using the Aspose.PDF library:

  1. Open a PDF document.
  2. Convert a PDF file to PPTX using SavePptx function.
  3. Close the PDF document and release any allocated resources.

    package main

    import "github.com/aspose-pdf/aspose-pdf-go-cpp"
    import "log"

    func main() {
      // Open(filename string) opens a PDF-document with filename
      pdf, err := asposepdf.Open("sample.pdf")
      if err != nil {
        log.Fatal(err)
      }
      // SavePptX(filename string) saves previously opened PDF-document as PptX-document with filename
      err = pdf.SavePptX("sample.pptx")
      if err != nil {
        log.Fatal(err)
      }
      // Close() releases allocated resources for PDF-document
      defer pdf.Close()
    }