com.aspose.slides

Interfaces

Classes

Exceptions

com.aspose.slides

Class Convert

  • java.lang.Object
    • com.aspose.slides.Convert


  • public class Convert
    extends java.lang.Object

    Represents a group of methods intended to convert Presentation.


     
     Convert.AutoByExtension("pres.pptx", "pres.pdf");
     
    • Constructor Detail

      • Convert

        public Convert()
    • Method Detail

      • autoByExtension

        public static void autoByExtension(java.lang.String presPath,
                                           java.lang.String outPath)

        Converts Presentation using the passed output path extension to determine the required export format.


         
         Convert.autoByExtension("pres.pptx", "pres.pdf");
         
        Parameters:
        presPath - Path of the input presentation
        outPath - Output path
        Throws:
        com.aspose.ms.System.ArgumentOutOfRangeException - If unknown or unsupported format
      • toPdf

        public static void toPdf(java.lang.String presPath,
                                 java.lang.String outPath)

        Converts Presentation to PDF.


         
         Convert.toPdf("pres.pptx", "pres.pdf");
         
        Parameters:
        presPath - Path of the input presentation
        outPath - Output path
      • toPdf

        public static void toPdf(java.lang.String presPath,
                                 java.lang.String outPath,
                                 IPdfOptions options)

        Converts Presentation to PDF.


         
         PdfOptions pdfOptions = new PdfOptions();
         pdfOptions.setCompliance(PdfCompliance.PdfUa);
         Convert.toPdf("pres.pptx", "pres.pdf", pdfOptions);
         
        Parameters:
        presPath - Path of the input presentation
        outPath - Output path
        options - Output PDF options
      • toPdf

        public static void toPdf(Presentation pres,
                                 java.lang.String outPath)

        Converts Presentation to PDF.


         
         Presentation pres = new Presentation("input.pptx");
         try {
             Convert.toPdf(pres, "output.pdf");
         } finally {
             if (pres != null) pres.dispose();
         } 
         
        Parameters:
        pres - Input presentation
        outPath - Output path
      • toPdf

        public static void toPdf(Presentation pres,
                                 java.lang.String outPath,
                                 IPdfOptions options)

        Converts Presentation to PDF.


         
         Presentation pres = new Presentation("input.pptx");
         try {
             PdfOptions pdfOptions = new PdfOptions();
             pdfOptions.setCompliance(PdfCompliance.PdfUa);
             Convert.toPdf(pres, "output.pdf", pdfOptions);
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Parameters:
        pres - Input presentation
        outPath - Output path
        options - Output PDF options
      • toSvg

        public static void toSvg(java.lang.String presPath)

        Converts Presentation to SVG.


         
         Convert.toSvg("pres.pptx");
         
        Parameters:
        presPath - Path of the input presentation
      • toSvg

        public static void toSvg(java.lang.String presPath,
                                 Convert.GetOutPathCallback getOutPath)

        Converts Presentation to SVG.


         
         Convert.toSvg("pres.pptx", (slide, index) -> String.format("pres_%d-out.svg", index));
         
        Parameters:
        presPath - Path of the input presentation
        getOutPath - Callback that returns the SVG output path for each slide in the presentation
      • toSvg

        public static void toSvg(Presentation pres,
                                 Convert.GetOutPathCallback getOutPath)

        Converts Presentation to SVG.


         
         Presentation pres = new Presentation("input.pptx");
         try {
             Convert.toSvg(pres, (slide, index) -> String.format("pres_%d-out.svg", index));
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Parameters:
        pres - Input presentation
        getOutPath - Callback that returns the SVG output path for each slide in the presentation
      • toSvg

        public static void toSvg(Presentation pres,
                                 ISVGOptions options)

        Converts Presentation to SVG.


         
         Presentation pres = new Presentation("input.pptx");
         try {
             SVGOptions svgOptions = new SVGOptions();
             svgOptions.setVectorizeText(true);
             Convert.toSvg(pres, svgOptions);
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Parameters:
        pres - Input presentation
        options - SVG export options
      • toSvg

        public static void toSvg(Presentation pres,
                                 Convert.GetOutPathCallback getOutPath,
                                 ISVGOptions options)

        Converts Presentation to SVG.


         
         Presentation pres = new Presentation("input.pptx");
         try {
             SVGOptions svgOptions = new SVGOptions();
             svgOptions.setVectorizeText(true);
             Convert.toSvg(pres, (slide, index) -> String.format("pres_%d-out.svg", index), svgOptions);
         } finally {
             if (pres != null) pres.dispose();
         }
         
        Parameters:
        pres - Input presentation
        getOutPath - Callback that returns the SVG output path for each slide in the presentation
        options - SVG export options