Convert

Inheritance: java.lang.Object

public class Convert

Represents a group of methods intended to convert Presentation.


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

Constructors

ConstructorDescription
Convert()

Methods

MethodDescription
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:

ParameterTypeDescription
presPathjava.lang.StringPath of the input presentation
outPathjava.lang.StringOutput 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:

ParameterTypeDescription
presPathjava.lang.StringPath of the input presentation
outPathjava.lang.StringOutput 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:

ParameterTypeDescription
presPathjava.lang.StringPath of the input presentation
outPathjava.lang.StringOutput path
optionsIPdfOptionsOutput 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:

ParameterTypeDescription
presPresentationInput presentation
outPathjava.lang.StringOutput 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:

ParameterTypeDescription
presPresentationInput presentation
outPathjava.lang.StringOutput path
optionsIPdfOptionsOutput PDF options

toSvg(String presPath)

public static void toSvg(String presPath)

Converts Presentation to SVG.


Convert.toSvg("pres.pptx");

Parameters:

ParameterTypeDescription
presPathjava.lang.StringPath 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:

ParameterTypeDescription
presPathjava.lang.StringPath of the input presentation
getOutPathGetOutPathCallbackCallback 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:

ParameterTypeDescription
presPresentationInput presentation
getOutPathGetOutPathCallbackCallback 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:

ParameterTypeDescription
presPresentationInput presentation
optionsISVGOptionsSVG 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:

ParameterTypeDescription
presPresentationInput presentation
getOutPathGetOutPathCallbackCallback that returns the SVG output path for each slide in the presentation
optionsISVGOptionsSVG export options