java.lang.Object
com.aspose.words.Converter
public abstract class Converter
The specified input and output files or streams, along with the desired save format,
are used to convert the given input document of the one format into the output document
of the other specified format. The convert functionality supports over 35+ different file formats. The With
| Method Summary | ||
|---|---|---|
static void | convert(java.lang.String inputFile, java.lang.String outputFile) | |
| Converts the given input document into the output document using specified input output file names and its extensions. | ||
static void | convert(java.lang.String inputFile, java.lang.String outputFile, SaveOptions saveOptions) | |
| Converts the given input document into the output document using specified input output file names and save options. | ||
static void | convert(java.lang.String inputFile, java.lang.String outputFile, int saveFormat) | |
| Converts the given input document into the output document using specified input output file names and the final document format. | ||
static System.IO.Stream[] | convertToImages(Document doc, ImageSaveOptions saveOptions) | |
| Converts the document pages to images. | ||
static System.IO.Stream[] | convertToImages(Document doc, int saveFormat) | |
| Converts the document pages to images. | ||
static System.IO.Stream[] | convertToImages(java.lang.String inputFile, ImageSaveOptions saveOptions) | |
| Converts the input file pages to images. | ||
static System.IO.Stream[] | convertToImages(java.lang.String inputFile, int saveFormat) | |
| Converts the input file pages to images. | ||
static void | convertToImages(java.lang.String inputFile, java.lang.String outputFile) | |
| Converts the input file pages to images. | ||
static void | convertToImages(java.lang.String inputFile, java.lang.String outputFile, ImageSaveOptions saveOptions) | |
| Converts the input file pages to images. | ||
static void | convertToImages(java.lang.String inputFile, java.lang.String outputFile, int saveFormat) | |
| Converts the input file pages to images. | ||
| Method Detail |
|---|
convert | |
public static void convert(java.lang.String inputFile, java.lang.String outputFile)
throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name.Example:
Shows how to convert documents with a single line of code.
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.pdf");
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.rtf", SaveFormat.RTF);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(); { saveOptions.setPassword("Aspose.Words"); }
Converter.convert(getMyDir() + "Document.doc", getArtifactsDir() + "LowCode.Convert.docx", saveOptions);convert | |
public static void convert(java.lang.String inputFile, java.lang.String outputFile, SaveOptions saveOptions) throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name.saveOptions - The save options.Example:
Shows how to convert documents with a single line of code.
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.pdf");
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.rtf", SaveFormat.RTF);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(); { saveOptions.setPassword("Aspose.Words"); }
Converter.convert(getMyDir() + "Document.doc", getArtifactsDir() + "LowCode.Convert.docx", saveOptions);convert | |
public static void convert(java.lang.String inputFile, java.lang.String outputFile, int saveFormat)
throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name.saveFormat - A Example:
Shows how to convert documents with a single line of code.
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.pdf");
Converter.convert(getMyDir() + "Document.docx", getArtifactsDir() + "LowCode.Convert.rtf", SaveFormat.RTF);
OoxmlSaveOptions saveOptions = new OoxmlSaveOptions(); { saveOptions.setPassword("Aspose.Words"); }
Converter.convert(getMyDir() + "Document.doc", getArtifactsDir() + "LowCode.Convert.docx", saveOptions);convertToImages | |
public static System.IO.Stream[] convertToImages(Document doc, ImageSaveOptions saveOptions) throws java.lang.Exception | |
doc - The input document.saveOptions - Image save options.Example:
Shows how to convert document to images stream.Stream[] streams = Converter.convertToImages(getMyDir() + "Big document.docx", SaveFormat.PNG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); streams = Converter.convertToImages(getMyDir() + "Big document.docx", imageSaveOptions); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), SaveFormat.PNG); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), imageSaveOptions);
convertToImages | |
public static System.IO.Stream[] convertToImages(Document doc, int saveFormat) throws java.lang.Exception | |
doc - The input document.saveFormat - A Example:
Shows how to convert document to images stream.Stream[] streams = Converter.convertToImages(getMyDir() + "Big document.docx", SaveFormat.PNG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); streams = Converter.convertToImages(getMyDir() + "Big document.docx", imageSaveOptions); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), SaveFormat.PNG); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), imageSaveOptions);
convertToImages | |
public static System.IO.Stream[] convertToImages(java.lang.String inputFile, ImageSaveOptions saveOptions) throws java.lang.Exception | |
inputFile - The input file name.saveOptions - Image save options.Example:
Shows how to convert document to images stream.Stream[] streams = Converter.convertToImages(getMyDir() + "Big document.docx", SaveFormat.PNG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); streams = Converter.convertToImages(getMyDir() + "Big document.docx", imageSaveOptions); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), SaveFormat.PNG); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), imageSaveOptions);
convertToImages | |
public static System.IO.Stream[] convertToImages(java.lang.String inputFile, int saveFormat)
throws java.lang.Exception | |
inputFile - The input file name.saveFormat - A Example:
Shows how to convert document to images stream.Stream[] streams = Converter.convertToImages(getMyDir() + "Big document.docx", SaveFormat.PNG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); streams = Converter.convertToImages(getMyDir() + "Big document.docx", imageSaveOptions); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), SaveFormat.PNG); streams = Converter.convertToImages(new Document(getMyDir() + "Big document.docx"), imageSaveOptions);
convertToImages | |
public static void convertToImages(java.lang.String inputFile, java.lang.String outputFile)
throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension"Example:
Shows how to convert document to images.Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png"); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.jpeg", SaveFormat.JPEG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png", imageSaveOptions);
convertToImages | |
public static void convertToImages(java.lang.String inputFile, java.lang.String outputFile, ImageSaveOptions saveOptions) throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension"saveOptions - Image save options.Example:
Shows how to convert document to images.Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png"); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.jpeg", SaveFormat.JPEG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png", imageSaveOptions);
convertToImages | |
public static void convertToImages(java.lang.String inputFile, java.lang.String outputFile, int saveFormat)
throws java.lang.Exception | |
inputFile - The input file name.outputFile - The output file name used to generate file name for page images using rule "outputFile_pageIndex.extension"saveFormat - A Example:
Shows how to convert document to images.Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png"); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.jpeg", SaveFormat.JPEG); ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.PNG); imageSaveOptions.setPageSet(new PageSet(1)); Converter.convertToImages(getMyDir() + "Big document.docx", getArtifactsDir() + "LowCode.ConvertToImages.png", imageSaveOptions);