|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.pdfbox.util.PageExtractor
public class PageExtractor
This class will extract one or more sequential pages and create a new document.
Field Summary | |
---|---|
protected int |
endPage
|
protected PDDocument |
sourceDocument
|
protected int |
startPage
|
Constructor Summary | |
---|---|
PageExtractor(PDDocument sourceDocument)
Creates a new instance of PageExtractor |
|
PageExtractor(PDDocument sourceDocument,
int startPage,
int endPage)
Creates a new instance of PageExtractor |
Method Summary | |
---|---|
PDDocument |
extract()
This will take a document and extract the desired pages into a new document. |
int |
getEndPage()
Gets the last page number (inclusive) to be extracted. |
int |
getStartPage()
Gets the first page number to be extracted. |
void |
setEndPage(int endPage)
Sets the last page number to be extracted. |
void |
setStartPage(int startPage)
Sets the first page number to be extracted. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected PDDocument sourceDocument
protected int startPage
protected int endPage
Constructor Detail |
---|
public PageExtractor(PDDocument sourceDocument)
document
- The document to split.public PageExtractor(PDDocument sourceDocument, int startPage, int endPage)
document
- The document to split.startPage
- The first page you want extracted (inclusive)endPage
- The last page you want extracted (inclusive)Method Detail |
---|
public PDDocument extract() throws java.io.IOException
java.io.IOException
- If there is an IOErrorpublic int getStartPage()
public void setStartPage(int startPage)
startPage
- the first page number which should be extractedpublic int getEndPage()
public void setEndPage(int endPage)
endPage
- the last page number which should be extracted
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |