public interface Document
| Modifier and Type | Field and Description |
|---|---|
static String |
TYPE_PDF |
static String |
TYPE_POSTSCRIPT |
| Modifier and Type | Method and Description |
|---|---|
void |
append(Document document)
Append pages of another document to the current document.
|
List<Document> |
explode()
Separate each pages to a new document.
|
Document |
extract(int begin,
int end)
Return a new document containing pages of a given range.
|
byte[] |
getContent()
Return document content as a byte array
|
int |
getPageCount()
Return document page count
|
int |
getSize()
Return document size
|
String |
getType()
Return the type of the document.
|
void |
load(File file)
Load document from a File.
|
void |
load(InputStream inputStream)
Load document from an InputStream.
|
void |
write(File file)
Write document to a File.
|
void |
write(OutputStream outputStream)
Write document to an OutputStream
|
static final String TYPE_POSTSCRIPT
static final String TYPE_PDF
void load(File file) throws FileNotFoundException, IOException
file - File.FileNotFoundExceptionIOExceptionvoid load(InputStream inputStream) throws IOException
inputStream - IOExceptionvoid write(File file) throws IOException
file - File.IOExceptionvoid write(OutputStream outputStream) throws IOException
outputStream - IOExceptionint getPageCount()
throws DocumentException
DocumentExceptionString getType()
int getSize()
byte[] getContent()
Document extract(int begin, int end) throws DocumentException
begin - Index of the first page to extractend - Index of the last page to extractDocumentExceptionvoid append(Document document) throws DocumentException
document - Document ot appendDocumentExceptionList<Document> explode() throws DocumentException
DocumentExceptionCopyright © 2016. All Rights Reserved.