Interface IMultipageImage

Interface IMultipageImage

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

The multipage image interface

public interface IMultipageImage

Examples

The following example shows how to export a multipage vector image to another format in general way without referencing to a particular image type.```csharp [C#]

                                                                                                                                                          string dir = "C:\\aspose.imaging\\net\\misc\\ImagingReleaseQATester\\Tests\\testdata\\2548";
                                                                                                                                                          string inputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr");
                                                                                                                                                          string outputFilePath = System.IO.Path.Combine(dir, "Multipage.cdr.tif");

                                                                                                                                                          Aspose.Imaging.ImageOptionsBase exportOptions = new Aspose.Imaging.ImageOptions.TiffOptions(Aspose.Imaging.FileFormats.Tiff.Enums.TiffExpectedFormat.Default);

                                                                                                                                                          using (Aspose.Imaging.Image image = Aspose.Imaging.Image.Load(inputFilePath))
                                                                                                                                                          {
                                                                                                                                                              exportOptions.MultiPageOptions = null;

                                                                                                                                                              // Export only first two pages
                                                                                                                                                              Aspose.Imaging.IMultipageImage multipageImage = image as Aspose.Imaging.IMultipageImage;
                                                                                                                                                              if (multipageImage != null && (multipageImage.Pages != null && multipageImage.PageCount > 2))
                                                                                                                                                              {
                                                                                                                                                                  exportOptions.MultiPageOptions = new Aspose.Imaging.ImageOptions.MultiPageOptions(new Aspose.Imaging.IntRange(0, 2));
                                                                                                                                                              }

                                                                                                                                                              if (image is Aspose.Imaging.VectorImage)
                                                                                                                                                              {
                                                                                                                                                                  exportOptions.VectorRasterizationOptions = (Aspose.Imaging.ImageOptions.VectorRasterizationOptions)image.GetDefaultOptions(new object[] { Aspose.Imaging.Color.White, image.Width, image.Height });
                                                                                                                                                                  exportOptions.VectorRasterizationOptions.TextRenderingHint = Aspose.Imaging.TextRenderingHint.SingleBitPerPixel;
                                                                                                                                                                  exportOptions.VectorRasterizationOptions.SmoothingMode = Aspose.Imaging.SmoothingMode.None;
                                                                                                                                                              }

                                                                                                                                                              image.Save(outputFilePath, exportOptions);
                                                                                                                                                          }

## Properties

### <a id="Aspose_Imaging_IMultipageImage_PageCount"></a> PageCount

Gets the page count.

```csharp
int PageCount { get; }

Property Value

int

PageExportingAction

Gets or sets the page exporting action. Please note that setting this method will automatically release page resources after it is executed. It will be executed just before each page is saved.

PageExportingAction PageExportingAction { get; set; }

Property Value

PageExportingAction

Pages

Gets the pages.

Image[] Pages { get; }

Property Value

Image[]