public class PageSet
Constructor Summary |
---|
PageSet(intpage)
Creates an one-page set based on exact page index. |
PageSet(int[]pages)
Creates a page set based on exact page indices. |
Property Getters/Setters Summary | ||
---|---|---|
static PageSet | getAll() | |
Gets a set with all the pages of the document in their original order.
|
||
static PageSet | getEven() | |
Gets a set with all the even pages of the document in their original order.
|
||
static PageSet | getOdd() | |
Gets a set with all the odd pages of the document in their original order.
|
public PageSet(int page)
page
- Zero-based index of the page.public PageSet(int[] pages)
pages
- Zero-based indices of pages.Example:
Shows how to extract pages based on exact page indices.Document doc = new Document(getMyDir() + "Images.docx"); XpsSaveOptions xpsOptions = new XpsSaveOptions(); xpsOptions.setPageSet(new PageSet(0, 1, 2, 4, 1, 3, 2, 3)); doc.save(getArtifactsDir() + "XpsSaveOptions.ExportExactPages.xps", xpsOptions);
public PageSet(PageRange[] ranges)
ranges
- Array of page ranges.Example:
Shows how to extract pages based on exact page ranges.Document doc = new Document(getMyDir() + "Images.docx"); ImageSaveOptions imageOptions = new ImageSaveOptions(SaveFormat.TIFF); PageSet pageSet = new PageSet(new PageRange(1, 1), new PageRange(2, 3), new PageRange(1, 3), new PageRange(2, 4), new PageRange(1, 1)); imageOptions.setPageSet(pageSet); doc.save(getArtifactsDir() + "ImageSaveOptions.ExportVariousPageRanges.tiff", imageOptions);
public static PageSet getAll()
public static PageSet getEven()
public static PageSet getOdd()