Convert

Inheritance: java.lang.Object

public class Convert

Represents a group of methods intended to convert Presentation.


Convert.AutoByExtension("pres.pptx", "pres.pdf");

Constructors

Constructor Description
Convert()

Methods

Method Description
autoByExtension(String presPath, String outPath) Converts Presentation using the passed output path extension to determine the required export format.
toPdf(String presPath, String outPath) Converts Presentation to PDF.
toPdf(String presPath, String outPath, IPdfOptions options) Converts Presentation to PDF.
toPdf(Presentation pres, String outPath) Converts Presentation to PDF.
toPdf(Presentation pres, String outPath, IPdfOptions options) Converts Presentation to PDF.
toSvg(String presPath) Converts Presentation to SVG.
toSvg(String presPath, Convert.GetOutPathCallback getOutPath) Converts Presentation to SVG.
toSvg(Presentation pres, Convert.GetOutPathCallback getOutPath) Converts Presentation to SVG.
toSvg(Presentation pres, ISVGOptions options) Converts Presentation to SVG.
toSvg(Presentation pres, Convert.GetOutPathCallback getOutPath, ISVGOptions options) Converts Presentation to SVG.

Convert()

public Convert()

autoByExtension(String presPath, String outPath)

public static void autoByExtension(String presPath, String outPath)

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


Convert.autoByExtension("pres.pptx", "pres.pdf");

Parameters:

Parameter Type Description
presPath java.lang.String Path of the input presentation
outPath java.lang.String Output path

toPdf(String presPath, String outPath)

public static void toPdf(String presPath, String outPath)

Converts Presentation to PDF.


Convert.toPdf("pres.pptx", "pres.pdf");

Parameters:

Parameter Type Description
presPath java.lang.String Path of the input presentation
outPath java.lang.String Output path

toPdf(String presPath, String outPath, IPdfOptions options)

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

Converts Presentation to PDF.


PdfOptions pdfOptions = new PdfOptions();
 pdfOptions.setCompliance(PdfCompliance.PdfUa);
 Convert.toPdf("pres.pptx", "pres.pdf", pdfOptions);

Parameters:

Parameter Type Description
presPath java.lang.String Path of the input presentation
outPath java.lang.String Output path
options IPdfOptions Output PDF options

toPdf(Presentation pres, String outPath)

public static void toPdf(Presentation pres, 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:

Parameter Type Description
pres Presentation Input presentation
outPath java.lang.String Output path

toPdf(Presentation pres, String outPath, IPdfOptions options)

public static void toPdf(Presentation pres, 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:

Parameter Type Description
pres Presentation Input presentation
outPath java.lang.String Output path
options IPdfOptions Output PDF options

toSvg(String presPath)

public static void toSvg(String presPath)

Converts Presentation to SVG.


Convert.toSvg("pres.pptx");

Parameters:

Parameter Type Description
presPath java.lang.String Path of the input presentation

toSvg(String presPath, Convert.GetOutPathCallback getOutPath)

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

Converts Presentation to SVG.


Convert.toSvg("pres.pptx", (slide, index) -> String.format("pres_%d-out.svg", index));

Parameters:

Parameter Type Description
presPath java.lang.String Path of the input presentation
getOutPath GetOutPathCallback Callback that returns the SVG output path for each slide in the presentation

toSvg(Presentation pres, Convert.GetOutPathCallback getOutPath)

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:

Parameter Type Description
pres Presentation Input presentation
getOutPath GetOutPathCallback Callback that returns the SVG output path for each slide in the presentation

toSvg(Presentation pres, ISVGOptions options)

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:

Parameter Type Description
pres Presentation Input presentation
options ISVGOptions SVG export options

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

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:

Parameter Type Description
pres Presentation Input presentation
getOutPath GetOutPathCallback Callback that returns the SVG output path for each slide in the presentation
options ISVGOptions SVG export options