Class MultiPageOptions

Class MultiPageOptions

Namespace: Aspose.Imaging.ImageOptions
Assembly: Aspose.Imaging.dll (25.2.0)

Base class for multiple pages supported formats

[JsonObject(MemberSerialization.OptIn)]
public class MultiPageOptions

Inheritance

objectMultiPageOptions

Derived

DjvuMultiPageOptions

Inherited Members

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

Constructors

MultiPageOptions()

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

[JsonConstructor]
public MultiPageOptions()

MultiPageOptions(int[])

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(int[] pages)

Parameters

pages int[]

The pages.

MultiPageOptions(int[], Rectangle)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(int[] pages, Rectangle exportArea)

Parameters

pages int[]

The array of pages.

exportArea Rectangle

The export area.

MultiPageOptions(string[])

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(string[] pageTitles)

Parameters

pageTitles string[]

The page titles.

MultiPageOptions(string[], Rectangle)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(string[] pageTitles, Rectangle exportArea)

Parameters

pageTitles string[]

The page titles.

exportArea Rectangle

The export area.

MultiPageOptions(IntRange[])

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(IntRange[] ranges)

Parameters

ranges IntRange[]

The Aspose.Imaging.IntRange.

MultiPageOptions(IntRange[], Rectangle)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(IntRange[] ranges, Rectangle exportArea)

Parameters

ranges IntRange[]

The Aspose.Imaging.IntRange.

exportArea Rectangle

The export area.

MultiPageOptions(IntRange)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(IntRange range)

Parameters

range IntRange

The Aspose.Imaging.IntRange.

MultiPageOptions(IntRange, Rectangle)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(IntRange range, Rectangle exportArea)

Parameters

range IntRange

The Aspose.Imaging.IntRange.

exportArea Rectangle

The export area.

MultiPageOptions(int)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(int page)

Parameters

page int

The page index.

MultiPageOptions(int, Rectangle)

Initializes a new instance of the Aspose.Imaging.ImageOptions.MultiPageOptions class.

public MultiPageOptions(int page, Rectangle exportArea)

Parameters

page int

The page index.

exportArea Rectangle

The export area.

Properties

ExportArea

Gets or sets the export area.

public Rectangle ExportArea { get; set; }

Property Value

Rectangle

MergeLayers

Gets or sets a value indicating whether [merege layers].

public bool MergeLayers { get; set; }

Property Value

bool

Mode

Gets or sets the mode.

public MultiPageMode Mode { get; set; }

Property Value

MultiPageMode

OutputLayersNames

Gets or sets the output layers names(Works if export format supports layers naming, for example for Psd)

public string[] OutputLayersNames { get; set; }

Property Value

string[]

PageRasterizationOptions

Gets or sets the page rasterization options.

public VectorRasterizationOptions[] PageRasterizationOptions { get; set; }

Property Value

VectorRasterizationOptions[]

PageTitles

Gets or sets the page titles.

public string[] PageTitles { get; set; }

Property Value

string[]

Examples

This example shows how to convert a multi-page DJVU image to a multi-frame TIFF image.```csharp [C#]

                                                                                             string dir = "c:\\temp\\";

                                                                                             // Load a DJVU image from a file stream.
                                                                                             using (System.IO.Stream stream = System.IO.File.OpenRead(dir + "sample.djvu"))
                                                                                             {
                                                                                                 using (Aspose.Imaging.FileFormats.Djvu.DjvuImage djvuImage = new Aspose.Imaging.FileFormats.Djvu.DjvuImage(stream))
                                                                                                 {
                                                                                                     Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                     saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Deflate;

                                                                                                     // Note that if the image is colorful, it will be automatically converted to B/W format according to the option below:
                                                                                                     saveOptions.BitsPerSample = new ushort[] { 1 };

                                                                                                     saveOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.DjvuMultiPageOptions();

                                                                                                     // By default, all pages will be stored to the output TIFF, but the desired set of pages can be specified explicitly.
                                                                                                     // Only the first and the second page will be exported.
                                                                                                     saveOptions.MultiPageOptions.Pages = new int[] { 0, 1 };

                                                                                                     // Set page titles.
                                                                                                     saveOptions.MultiPageOptions.PageTitles = new string[] { "The First Page", "The Second Page" };

                                                                                                     // Save to TIFF
                                                                                                     djvuImage.Save(dir + "sample.tif", saveOptions);
                                                                                                 }
                                                                                             }

### <a id="Aspose_Imaging_ImageOptions_MultiPageOptions_Pages"></a> Pages

Gets or sets the pages.

```csharp
public int[] Pages { get; set; }

Property Value

int[]

Examples

This example shows how to convert a multi-page DJVU image to a multi-frame TIFF image.```csharp [C#]

                                                                                             string dir = "c:\\temp\\";

                                                                                             // Load a DJVU image from a file stream.
                                                                                             using (System.IO.Stream stream = System.IO.File.OpenRead(dir + "sample.djvu"))
                                                                                             {
                                                                                                 using (Aspose.Imaging.FileFormats.Djvu.DjvuImage djvuImage = new Aspose.Imaging.FileFormats.Djvu.DjvuImage(stream))
                                                                                                 {
                                                                                                     Aspose.Imaging.ImageOptions.TiffOptions saveOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);
                                                                                                     saveOptions.Compression = Aspose.Imaging.FileFormats.Tiff.Enums.TiffCompressions.Deflate;

                                                                                                     // Note that if the image is colorful, it will be automatically converted to B/W format according to the option below:
                                                                                                     saveOptions.BitsPerSample = new ushort[] { 1 };

                                                                                                     saveOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.DjvuMultiPageOptions();

                                                                                                     // By default, all pages will be stored to the output TIFF, but the desired set of pages can be specified explicitly.
                                                                                                     // Only the first and the second page will be exported.
                                                                                                     saveOptions.MultiPageOptions.Pages = new int[] { 0, 1 };

                                                                                                     // Set page titles.
                                                                                                     saveOptions.MultiPageOptions.PageTitles = new string[] { "The First Page", "The Second Page" };

                                                                                                     // Save to TIFF
                                                                                                     djvuImage.Save(dir + "sample.tif", saveOptions);
                                                                                                 }
                                                                                             }

### <a id="Aspose_Imaging_ImageOptions_MultiPageOptions_TimeInterval"></a> TimeInterval

Gets or sets the time interval.

```csharp
public TimeInterval TimeInterval { get; set; }

Property Value

TimeInterval

Methods

CheckModeAvailability(MultiPageMode)

Checks the mode application.

protected virtual void CheckModeAvailability(MultiPageMode mode)

Parameters

mode MultiPageMode

The mode indexes.

InitPages(IntRange[])

Initializes the pages from ranges array

public void InitPages(IntRange[] ranges)

Parameters

ranges IntRange[]

The ranges.