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_SIZEFields inherited from interface org.ghost4j.document.Document
TYPE_PDF, TYPE_POSTSCRIPT -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidAppend pages of another document to the current document.extract(int begin, int end) Return a new document containing pages of a given range.intReturn document page countgetType()Return the type of the document.voidload(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:DocumentLoad document from an InputStream.- Specified by:
loadin interfaceDocument- Overrides:
loadin classAbstractDocument- Parameters:
inputStream-- Throws:
IOException
-
getPageCount
Description copied from interface:DocumentReturn document page count- Returns:
- Number of pages.
- Throws:
DocumentException
-
extract
Description copied from interface:DocumentReturn 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:DocumentAppend pages of another document to the current document.- Specified by:
appendin interfaceDocument- Overrides:
appendin classAbstractDocument- Parameters:
document- Document ot append- Throws:
DocumentException
-
getType
Description copied from interface:DocumentReturn the type of the document.- Returns:
- A String representing the document type name.
-