ConvertToImages
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 end user.
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 end user.
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 end user.
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 end user.
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 end user.
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 end user.
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 end user.
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