Package org.ghost4j.document
Class PSDocument
java.lang.Object
org.ghost4j.document.AbstractDocument
org.ghost4j.document.PSDocument
- All Implemented Interfaces:
Serializable,Document
Class representing a PostScript 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 TypeMethodDescriptionvoidThis methods appends pages the DSC way (only by relying on the structure).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
-
PSDocument
public PSDocument()
-
-
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
This methods appends pages the DSC way (only by relying on the structure). It does not work with documents generated by different softwares / spools. It is intended to be used only for rearranging pages of the same document. If you need to append a different document, consider using the SafeAppenderModifier instead.- Specified by:
appendin interfaceDocument- Overrides:
appendin classAbstractDocument- Parameters:
document- Document ot append- Throws:
DocumentException- See Also:
-
getType
Description copied from interface:DocumentReturn the type of the document.- Returns:
- A String representing the document type name.
-