public abstract class MultiPageOptions extends Object
Base class for multiple pages supported formats
Modifier and Type | Method and Description |
---|---|
Rectangle |
getExportArea()
Gets or sets the export area.
|
int |
getMode()
Gets or sets the mode.
|
String[] |
getOutputLayersNames()
Gets or sets the output layers names(Works if export format supports layers naming, for example for Psd)
|
int[] |
getPages()
Gets or sets the pages.
|
String[] |
getPageTitles()
Gets or sets the page titles.
|
void |
initPages(IntRange[] ranges)
Initializes the pages from ranges array
|
void |
setExportArea(Rectangle value)
Gets or sets the export area.
|
void |
setMode(int value)
Gets or sets the mode.
|
void |
setOutputLayersNames(String[] value)
Gets or sets the output layers names(Works if export format supports layers naming, for example for Psd)
|
void |
setPages(int[] value)
Gets or sets the pages.
|
void |
setPageTitles(String[] value)
Gets or sets the page titles.
|
public int[] getPages()
Gets or sets the pages.
Value: The pages.public void setPages(int[] value)
Gets or sets the pages.
Value: The pages.This example shows how to convert a multi-page DJVU image to a multi-frame TIFF image.
String dir = "c:\\temp\\"; // Load a DJVU image from a file stream. java.io.FileInputStream stream = new java.io.FileInputStream(dir + "sample.djvu"); try { com.aspose.imaging.fileformats.djvu.DjvuImage djvuImage = new com.aspose.imaging.fileformats.djvu.DjvuImage(stream); try { com.aspose.imaging.imageoptions.TiffOptions saveOptions = new com.aspose.imaging.imageoptions.TiffOptions(com.aspose.imaging.fileformats.tiff.enums.TiffExpectedFormat.Default); saveOptions.setCompression(com.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.setBitsPerSample(new int[]{1}); saveOptions.setMultiPageOptions(new com.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.getMultiPageOptions().setPages(new int[]{0, 1}); // Set page titles. saveOptions.getMultiPageOptions().setPageTitles(new String[]{"The First Page", "The Second Page"}); // Save to TIFF djvuImage.save(dir + "sample.tif", saveOptions); } finally { djvuImage.dispose(); } } finally { stream.close(); }
public String[] getPageTitles()
Gets or sets the page titles.
Value: The page titles.public void setPageTitles(String[] value)
Gets or sets the page titles.
Value: The page titles.This example shows how to convert a multi-page DJVU image to a multi-frame TIFF image.
String dir = "c:\\temp\\"; // Load a DJVU image from a file stream. java.io.FileInputStream stream = new java.io.FileInputStream(dir + "sample.djvu"); try { com.aspose.imaging.fileformats.djvu.DjvuImage djvuImage = new com.aspose.imaging.fileformats.djvu.DjvuImage(stream); try { com.aspose.imaging.imageoptions.TiffOptions saveOptions = new com.aspose.imaging.imageoptions.TiffOptions(com.aspose.imaging.fileformats.tiff.enums.TiffExpectedFormat.Default); saveOptions.setCompression(com.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.setBitsPerSample(new int[]{1}); saveOptions.setMultiPageOptions(new com.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.getMultiPageOptions().setPages(new int[]{0, 1}); // Set page titles. saveOptions.getMultiPageOptions().setPageTitles(new String[]{"The First Page", "The Second Page"}); // Save to TIFF djvuImage.save(dir + "sample.tif", saveOptions); } finally { djvuImage.dispose(); } } finally { stream.close(); }
public Rectangle getExportArea()
Gets or sets the export area.
Value: The export area.public void setExportArea(Rectangle value)
Gets or sets the export area.
Value: The export area.public int getMode()
Gets or sets the mode.
Value: The mode.public void setMode(int value)
Gets or sets the mode.
Value: The mode.public String[] getOutputLayersNames()
Gets or sets the output layers names(Works if export format supports layers naming, for example for Psd)
Value: The output layers names.public void setOutputLayersNames(String[] value)
Gets or sets the output layers names(Works if export format supports layers naming, for example for Psd)
Value: The output layers names.public void initPages(IntRange[] ranges)
Initializes the pages from ranges array
ranges
- The ranges.Copyright (c) 2008-2019 Aspose Pty Ltd. All Rights Reserved.