package com.yeejoin.amos.file.convert;


import java.io.OutputStream;

import com.aspose.pdf.*;

public class PPTConvert {
	/**
	 * pdf转为ppt
	 * @param pdfpath pdf路径
	 * @param pptpath ppt路径
	 */
	public static void docx2pdf(String pdfpath, String pptpath) {
	    // Load source PDF file
	    Document doc = new Document(pdfpath);
	    // Instantiate Doc SaveOptions instance
	    PptxSaveOptions saveOptions = new PptxSaveOptions();
	    doc.save(pptpath, saveOptions);
	}
	
	public static void docx2pdf(String pdfpath, OutputStream out) {
	    // Load source PDF file
	    Document doc = new Document(pdfpath);
	    // Instantiate Doc SaveOptions instance
	    PptxSaveOptions saveOptions = new PptxSaveOptions();
	    // Save resultant DOCX file
	    doc.save(out, saveOptions);
	}
}
