Class Converter

Class Converter

Namespace: Aspose.Words.LowCode
Assembly: Aspose.Words.dll (25.2.0)

Represents a group of methods intended to convert a variety of different types of documents using a single line of code.

public static class Converter

Inheritance

objectConverter

Inherited Members

object.GetType(), object.MemberwiseClone(), object.ToString(), object.Equals(object?), object.Equals(object?, object?), object.ReferenceEquals(object?, object?), object.GetHashCode()

Remarks

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 Aspose.Words.LowCode.Converter.ConvertToImages(System.String,System.String) group of methods are designed to transform documents into images, with each page being converted into a separate image file. These methods also convert PDF documents directly to fixed-page formats without loading them into the document model, which enhances both performance and accuracy.

With Aspose.Words.Saving.ImageSaveOptions.PageSet, you can specify a particular set of pages to convert into images.

Methods

Convert(string, string)

Converts the given input document into the output document using specified input output file names and its extensions.

public static void Convert(string inputFile, string outputFile)

Parameters

inputFile string

The input file name.

outputFile string

The output file name.

Convert(string, string, SaveFormat)

Converts the given input document into the output document using specified input output file names and the final document format.

public static void Convert(string inputFile, string outputFile, SaveFormat saveFormat)

Parameters

inputFile string

The input file name.

outputFile string

The output file name.

saveFormat SaveFormat

The save format.

Convert(string, string, SaveOptions)

Converts the given input document into the output document using specified input output file names and save options.

public static void Convert(string inputFile, string outputFile, SaveOptions saveOptions)

Parameters

inputFile string

The input file name.

outputFile string

The output file name.

saveOptions SaveOptions

The save options.

Convert(string, LoadOptions, string, SaveOptions)

Converts the given input document into the output document using specified input output file names its load/save options.

public static void Convert(string inputFile, LoadOptions loadOptions, string outputFile, SaveOptions saveOptions)

Parameters

inputFile string

The input file name.

loadOptions LoadOptions

The input document load options.

outputFile string

The output file name.

saveOptions SaveOptions

The save options.

Convert(Stream, Stream, SaveFormat)

Converts the given input document into a single output document using specified input and output streams.

public static void Convert(Stream inputStream, Stream outputStream, SaveFormat saveFormat)

Parameters

inputStream Stream

The input stream.

outputStream Stream

The output stream.

saveFormat SaveFormat

The save format.

Convert(Stream, Stream, SaveOptions)

Converts the given input document into a single output document using specified input and output streams.

public static void Convert(Stream inputStream, Stream outputStream, SaveOptions saveOptions)

Parameters

inputStream Stream

The input streams.

outputStream Stream

The output stream.

saveOptions SaveOptions

The save options.

Convert(Stream, LoadOptions, Stream, SaveOptions)

Converts the given input document into a single output document using specified input and output streams.

public static void Convert(Stream inputStream, LoadOptions loadOptions, Stream outputStream, SaveOptions saveOptions)

Parameters

inputStream Stream

The input streams.

loadOptions LoadOptions

The input document load options.

outputStream Stream

The output stream.

saveOptions SaveOptions

The save options.

ConvertToImages(string, string)

Converts the pages of the specified input file to image files.

public static void ConvertToImages(string inputFile, string outputFile)

Parameters

inputFile string

The input file name.

outputFile string

The output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”

ConvertToImages(string, string, SaveFormat)

Converts the pages of the specified input file to image files in the specified format.

public static void ConvertToImages(string inputFile, string outputFile, SaveFormat saveFormat)

Parameters

inputFile string

The input file name.

outputFile string

The output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”

saveFormat SaveFormat

Save format. Only image save formats are allowed.

ConvertToImages(string, string, ImageSaveOptions)

Converts the pages of the specified input file to image files using the specified save options.

public static void ConvertToImages(string inputFile, string outputFile, ImageSaveOptions saveOptions)

Parameters

inputFile string

The input file name.

outputFile string

The output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”

saveOptions ImageSaveOptions

Image save options.

ConvertToImages(string, LoadOptions, string, ImageSaveOptions)

Converts the pages of the specified input file to image files using the provided load and save options.

public static void ConvertToImages(string inputFile, LoadOptions loadOptions, string outputFile, ImageSaveOptions saveOptions)

Parameters

inputFile string

The input file name.

loadOptions LoadOptions

The input document load options.

outputFile string

The output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”

saveOptions ImageSaveOptions

Image save options.

ConvertToImages(string, SaveFormat)

Converts the pages of the specified input file to images in the specified format and returns an array of streams containing the images.

public static Stream[] ConvertToImages(string inputFile, SaveFormat saveFormat)

Parameters

inputFile string

The input file name.

saveFormat SaveFormat

Save format. Only image save formats are allowed.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(string, ImageSaveOptions)

Converts the pages of the specified input file to images using the specified save options and returns an array of streams containing the images.

public static Stream[] ConvertToImages(string inputFile, ImageSaveOptions saveOptions)

Parameters

inputFile string

The input file name.

saveOptions ImageSaveOptions

Image save options.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(Stream, SaveFormat)

Converts the pages of the specified input stream to images in the specified format and returns an array of streams containing the images.

public static Stream[] ConvertToImages(Stream inputStream, SaveFormat saveFormat)

Parameters

inputStream Stream

The input stream.

saveFormat SaveFormat

Save format. Only image save formats are allowed.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(Stream, ImageSaveOptions)

Converts the pages of the specified input stream to images using the specified save options and returns an array of streams containing the images.

public static Stream[] ConvertToImages(Stream inputStream, ImageSaveOptions saveOptions)

Parameters

inputStream Stream

The input stream.

saveOptions ImageSaveOptions

Image save options.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(Stream, LoadOptions, ImageSaveOptions)

Converts the pages of the specified input stream to images using the provided load and save options, and returns an array of streams containing the images.

public static Stream[] ConvertToImages(Stream inputStream, LoadOptions loadOptions, ImageSaveOptions saveOptions)

Parameters

inputStream Stream

The input stream.

loadOptions LoadOptions

The input document load options.

saveOptions ImageSaveOptions

Image save options.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(Document, SaveFormat)

Converts the pages of the specified document to images in the specified format and returns an array of streams containing the images.

public static Stream[] ConvertToImages(Document doc, SaveFormat saveFormat)

Parameters

doc Document

The input document.

saveFormat SaveFormat

Save format. Only image save formats are allowed.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

ConvertToImages(Document, ImageSaveOptions)

Converts the pages of the specified document to images using the specified save options and returns an array of streams containing the images.

public static Stream[] ConvertToImages(Document doc, ImageSaveOptions saveOptions)

Parameters

doc Document

The input document.

saveOptions ImageSaveOptions

Image save options.

Returns

Stream[]

Returns array of image streams. The streams should be disposed by the end user.

 English