Package org.ghost4j.document
Class PDFDocument
java.lang.Object
org.ghost4j.document.AbstractDocument
org.ghost4j.document.PDFDocument
- All Implemented Interfaces:
Serializable
,Document
- See Also:
-
Field Summary
FieldsFields inherited from class org.ghost4j.document.AbstractDocument
content, READ_BUFFER_SIZE
Fields inherited from interface org.ghost4j.document.Document
TYPE_PDF, TYPE_POSTSCRIPT
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoid
Append pages of another document to the current document.extract
(int begin, int end) Return a new document containing pages of a given range.int
Return document page countgetType()
Return the type of the document.void
load
(InputStream inputStream) Load document from an InputStream.Methods inherited from class org.ghost4j.document.AbstractDocument
assertValidPageIndex, assertValidPageRange, explode, getContent, getSize, load, write, write
-
Field Details
-
serialVersionUID
private static final long serialVersionUIDSerial version UID.- See Also:
-
-
Constructor Details
-
PDFDocument
public PDFDocument()
-
-
Method Details
-
load
Description copied from interface:Document
Load document from an InputStream.- Specified by:
load
in interfaceDocument
- Overrides:
load
in classAbstractDocument
- Parameters:
inputStream
-- Throws:
IOException
-
getPageCount
Description copied from interface:Document
Return document page count- Returns:
- Number of pages.
- Throws:
DocumentException
-
extract
Description copied from interface:Document
Return a new document containing pages of a given range. Note : begin and end indicies start at 1- Parameters:
begin
- Index of the first page to extractend
- Index of the last page to extract- Returns:
- A new document.
- Throws:
DocumentException
-
append
Description copied from interface:Document
Append pages of another document to the current document.- Specified by:
append
in interfaceDocument
- Overrides:
append
in classAbstractDocument
- Parameters:
document
- Document ot append- Throws:
DocumentException
-
getType
Description copied from interface:Document
Return the type of the document.- Returns:
- A String representing the document type name.
-