|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectcom.teamdev.jxdocument.Document
public class Document
Represents a PDF document. When you don't need Document instance anymore make sure
that you close it using close() method, otherwise you can see memory leak.
| Constructor Summary | |
|---|---|
Document(java.io.File file)
Constructs a new Document instance from a specified PDF file. |
|
| Method Summary | |
|---|---|
void |
close()
Closes current document and releases all its resources and allocated memory. |
Page |
getPageAt(int pageIndex)
Returns specified page in the document at specified page index/number. |
int |
getPageCount()
Returns total number of pages in the PDF document. |
java.util.List<Page> |
getPages()
Returns a list of pages in the PDF document. |
boolean |
isClosed()
Returns true when document was closed via close() method. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Document(java.io.File file)
Document instance from a specified PDF file.
file - a PDF file. The file instance must exist and represent a valid PDF file.
java.lang.IllegalArgumentException - when file parameter is null, a directory or
the file doesn't exist.
java.lang.IllegalStateException - when error occurs during document loading.| Method Detail |
|---|
public java.util.List<Page> getPages()
java.lang.IllegalStateException - when document is closed.public int getPageCount()
java.lang.IllegalStateException - when document is closed.public Page getPageAt(int pageIndex)
pageIndex - represents page number in the document. Starts from 0.
java.lang.IllegalArgumentException - when pageIndex is < 0 and >= total pages count.
java.lang.IllegalStateException - when document is closed.public void close()
isClosed() method.
public boolean isClosed()
true when document was closed via close() method.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||