public class PageBuilder extends Object
PageInfo builder for getting the page collection from the documents.
| Constructor and Description |
|---|
PageBuilder()
Initializes a new instance of the
PageBuilder class. |
PageBuilder(PageBuilderOptions options)
Initializes a new instance of the
PageBuilder class. |
| Modifier and Type | Method and Description |
|---|---|
void |
addDocument(DocumentInfo document)
Add document to the document collection.
|
void |
addDocument(int index,
InputStream stream,
FileType fileType,
String password)
Add document to the document collection.
|
void |
addPage(int documentIndex,
int pageNumber)
Add page to the page collection.
|
void |
addPage(IPageInfo page)
Add page to the page collection.
|
void |
addPageRange(IPageInfo[] pages)
Add pages to the page collection.
|
void |
clear()
Clear the internal collections.
|
Map<Integer,DocumentInfo> |
getDocuments()
The document collection.
|
PageBuilderOptions |
getOptions()
The page builder options.
|
List<PageInfo> |
getPages()
The page collection.
|
public PageBuilder()
Initializes a new instance of the PageBuilder class.
public PageBuilder(PageBuilderOptions options)
Initializes a new instance of the PageBuilder class.
options - The page builder options.com.aspose.ms.System.ArgumentNullException - Thrown when options is null.public final void addDocument(DocumentInfo document)
Add document to the document collection.
document - DocumentInfo instance.public final void addDocument(int index,
InputStream stream,
FileType fileType,
String password)
Add document to the document collection.
index - DocumentInfo index.stream - DocumentInfo stream.fileType - DocumentInfo type.password - DocumentInfo password.com.aspose.ms.System.IndexOutOfRangeExceptionpublic final void addPage(int documentIndex,
int pageNumber)
throws Exception
Add page to the page collection.
documentIndex - DocumentInfo index.pageNumber - PageInfo number.com.aspose.ms.System.IndexOutOfRangeExceptionExceptionpublic final void addPage(IPageInfo page) throws Exception
Add page to the page collection.
page - PageInfo instance.com.aspose.ms.System.IndexOutOfRangeExceptionExceptionpublic final void addPageRange(IPageInfo[] pages) throws Exception
Add pages to the page collection.
pages - Pages array.com.aspose.ms.System.IndexOutOfRangeExceptionExceptionpublic final void clear()
Clear the internal collections.
public final Map<Integer,DocumentInfo> getDocuments()
The document collection.
public final PageBuilderOptions getOptions()
The page builder options.
Copyright © 2025. All rights reserved.