ConvertToImages

ConvertToImages(string, string)

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

public static void ConvertToImages(string inputFile, string outputFile)
ParameterTypeDescription
inputFileStringThe input file name.
outputFileStringThe output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”

Examples

Shows how to convert document to images.

string doc = MyDir + "Big document.docx";

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.1.png");

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.2.jpeg", SaveFormat.Jpeg);

LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
Converter.ConvertToImages(doc, loadOptions, ArtifactsDir + "LowCode.ConvertToImages.3.png", imageSaveOptions);

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.4.png", imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputFileStringThe input file name.
outputFileStringThe output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”
saveFormatSaveFormatSave format. Only image save formats are allowed.

Examples

Shows how to convert document to images.

string doc = MyDir + "Big document.docx";

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.1.png");

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.2.jpeg", SaveFormat.Jpeg);

LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
Converter.ConvertToImages(doc, loadOptions, ArtifactsDir + "LowCode.ConvertToImages.3.png", imageSaveOptions);

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.4.png", imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputFileStringThe input file name.
outputFileStringThe output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”
saveOptionsImageSaveOptionsImage save options.

Examples

Shows how to convert document to images.

string doc = MyDir + "Big document.docx";

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.1.png");

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.2.jpeg", SaveFormat.Jpeg);

LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
Converter.ConvertToImages(doc, loadOptions, ArtifactsDir + "LowCode.ConvertToImages.3.png", imageSaveOptions);

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.4.png", imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputFileStringThe input file name.
loadOptionsLoadOptionsThe input document load options.
outputFileStringThe output file name used to generate file name for page images using rule “outputFile_pageIndex.extension”
saveOptionsImageSaveOptionsImage save options.

Examples

Shows how to convert document to images.

string doc = MyDir + "Big document.docx";

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.1.png");

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.2.jpeg", SaveFormat.Jpeg);

LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
Converter.ConvertToImages(doc, loadOptions, ArtifactsDir + "LowCode.ConvertToImages.3.png", imageSaveOptions);

Converter.ConvertToImages(doc, ArtifactsDir + "LowCode.ConvertToImages.4.png", imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputFileStringThe input file name.
saveFormatSaveFormatSave format. Only image save formats are allowed.

Return Value

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

Examples

Shows how to convert document to images stream.

string doc = MyDir + "Big document.docx";

Stream[] streams = Converter.ConvertToImages(doc, SaveFormat.Png);

ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
streams = Converter.ConvertToImages(doc, imageSaveOptions);

streams = Converter.ConvertToImages(new Document(doc), SaveFormat.Png);

streams = Converter.ConvertToImages(new Document(doc), imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputFileStringThe input file name.
saveOptionsImageSaveOptionsImage save options.

Return Value

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

Examples

Shows how to convert document to images stream.

string doc = MyDir + "Big document.docx";

Stream[] streams = Converter.ConvertToImages(doc, SaveFormat.Png);

ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
streams = Converter.ConvertToImages(doc, imageSaveOptions);

streams = Converter.ConvertToImages(new Document(doc), SaveFormat.Png);

streams = Converter.ConvertToImages(new Document(doc), imageSaveOptions);

See Also


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)
ParameterTypeDescription
inputStreamStreamThe input stream.
saveFormatSaveFormatSave format. Only image save formats are allowed.

Return Value

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

Examples

Shows how to convert document to images from stream.

using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
    Stream[] streams = Converter.ConvertToImages(streamIn, SaveFormat.Jpeg);

    ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
    imageSaveOptions.PageSet = new PageSet(1);
    streams = Converter.ConvertToImages(streamIn, imageSaveOptions);

    LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
    Converter.ConvertToImages(streamIn, loadOptions, imageSaveOptions);
}

See Also


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)
ParameterTypeDescription
inputStreamStreamThe input stream.
saveOptionsImageSaveOptionsImage save options.

Return Value

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

Examples

Shows how to convert document to images from stream.

using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
    Stream[] streams = Converter.ConvertToImages(streamIn, SaveFormat.Jpeg);

    ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
    imageSaveOptions.PageSet = new PageSet(1);
    streams = Converter.ConvertToImages(streamIn, imageSaveOptions);

    LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
    Converter.ConvertToImages(streamIn, loadOptions, imageSaveOptions);
}

See Also


ConvertToImages(Stream, LoadOptionsImageSaveOptions)

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)
ParameterTypeDescription
inputStreamStreamThe input stream.
loadOptionsLoadOptionsThe input document load options.
saveOptionsImageSaveOptionsImage save options.

Return Value

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

Examples

Shows how to convert document to images from stream.

using (FileStream streamIn = new FileStream(MyDir + "Big document.docx", FileMode.Open, FileAccess.Read))
{
    Stream[] streams = Converter.ConvertToImages(streamIn, SaveFormat.Jpeg);

    ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
    imageSaveOptions.PageSet = new PageSet(1);
    streams = Converter.ConvertToImages(streamIn, imageSaveOptions);

    LoadOptions loadOptions = new LoadOptions() { IgnoreOleData = false };
    Converter.ConvertToImages(streamIn, loadOptions, imageSaveOptions);
}

See Also


ConvertToImages(DocumentSaveFormat)

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)
ParameterTypeDescription
docDocumentThe input document.
saveFormatSaveFormatSave format. Only image save formats are allowed.

Return Value

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

Examples

Shows how to convert document to images stream.

string doc = MyDir + "Big document.docx";

Stream[] streams = Converter.ConvertToImages(doc, SaveFormat.Png);

ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
streams = Converter.ConvertToImages(doc, imageSaveOptions);

streams = Converter.ConvertToImages(new Document(doc), SaveFormat.Png);

streams = Converter.ConvertToImages(new Document(doc), imageSaveOptions);

See Also


ConvertToImages(DocumentImageSaveOptions)

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)
ParameterTypeDescription
docDocumentThe input document.
saveOptionsImageSaveOptionsImage save options.

Return Value

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

Examples

Shows how to convert document to images stream.

string doc = MyDir + "Big document.docx";

Stream[] streams = Converter.ConvertToImages(doc, SaveFormat.Png);

ImageSaveOptions imageSaveOptions = new ImageSaveOptions(SaveFormat.Png);
imageSaveOptions.PageSet = new PageSet(1);
streams = Converter.ConvertToImages(doc, imageSaveOptions);

streams = Converter.ConvertToImages(new Document(doc), SaveFormat.Png);

streams = Converter.ConvertToImages(new Document(doc), imageSaveOptions);

See Also