在 Rust 中将 PDF 转换为 PPTX

将 PDF 转换为 PPTX

提供的 Rust 代码片段演示了如何使用 Aspose.PDF 库将 PDF 文档转换为 PPTX:

  1. 打开 PDF 文档。
  2. 使用 将 PDF 文件转换为 PPTX save_pptx 函数。

  use asposepdf::Document;

  fn main() -> Result<(), Box<dyn std::error::Error>> {
      // Open a PDF-document with filename
      let pdf = Document::open("sample.pdf")?;

      // Convert and save the previously opened PDF-document as PptX-document
      pdf.save_pptx("sample.pptx")?;

      Ok(())
  }