public class Convert
extends java.lang.Object
Represents a group of methods intended to convert Presentation
.
Convert.AutoByExtension("pres.pptx", "pres.pdf");
Modifier and Type | Class and Description |
---|---|
static interface |
Convert.GetOutPathCallback |
Constructor and Description |
---|
Convert() |
Modifier and Type | Method and Description |
---|---|
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. |
static void |
toPdf(Presentation pres,
java.lang.String outPath)
Converts
Presentation to PDF. |
static void |
toPdf(Presentation pres,
java.lang.String outPath,
IPdfOptions options)
Converts
Presentation to PDF. |
static void |
toPdf(java.lang.String presPath,
java.lang.String outPath)
Converts
Presentation to PDF. |
static void |
toPdf(java.lang.String presPath,
java.lang.String outPath,
IPdfOptions options)
Converts
Presentation to PDF. |
static void |
toSvg(Presentation pres,
Convert.GetOutPathCallback getOutPath)
Converts
Presentation to SVG. |
static void |
toSvg(Presentation pres,
Convert.GetOutPathCallback getOutPath,
ISVGOptions options)
Converts
Presentation to SVG. |
static void |
toSvg(Presentation pres,
ISVGOptions options)
Converts
Presentation to SVG. |
static void |
toSvg(java.lang.String presPath)
Converts
Presentation to SVG. |
static void |
toSvg(java.lang.String presPath,
Convert.GetOutPathCallback getOutPath)
Converts
Presentation to SVG. |
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");
presPath
- Path of the input presentationoutPath
- Output pathcom.aspose.ms.System.ArgumentOutOfRangeException
- If unknown or unsupported formatpublic static void toPdf(java.lang.String presPath, java.lang.String outPath)
presPath
- Path of the input presentationoutPath
- Output pathpublic 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);
presPath
- Path of the input presentationoutPath
- Output pathoptions
- Output PDF optionspublic 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(); }
pres
- Input presentationoutPath
- Output pathpublic 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(); }
pres
- Input presentationoutPath
- Output pathoptions
- Output PDF optionspublic static void toSvg(java.lang.String presPath)
presPath
- Path of the input presentationpublic 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));
presPath
- Path of the input presentationgetOutPath
- Callback that returns the SVG output path for each slide in the presentationpublic 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(); }
pres
- Input presentationgetOutPath
- Callback that returns the SVG output path for each slide in the presentationpublic 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(); }
pres
- Input presentationoptions
- SVG export optionspublic 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(); }
pres
- Input presentationgetOutPath
- Callback that returns the SVG output path for each slide in the presentationoptions
- SVG export options