ConvertToImages
ConvertToImages(string, string)
Converts the pages of the specified input file to image files.
public static void ConvertToImages(string inputFile, string outputFile)
Parameter | Type | Description |
---|---|---|
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” |
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
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
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. |
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
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
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. |
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
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
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. |
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
- class LoadOptions
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
saveFormat | SaveFormat | Save 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
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputFile | String | The input file name. |
saveOptions | ImageSaveOptions | Image 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
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
saveFormat | SaveFormat | Save 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
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
saveOptions | ImageSaveOptions | Image 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
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
inputStream | Stream | The input stream. |
loadOptions | LoadOptions | The input document load options. |
saveOptions | ImageSaveOptions | Image 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
- class LoadOptions
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
doc | Document | The input document. |
saveFormat | SaveFormat | Save 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
- class Document
- enum SaveFormat
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words
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)
Parameter | Type | Description |
---|---|---|
doc | Document | The input document. |
saveOptions | ImageSaveOptions | Image 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
- class Document
- class ImageSaveOptions
- class Converter
- namespace Aspose.Words.LowCode
- assembly Aspose.Words