public class PdfFileReader extends Object
| Modifier and Type | Field and Description |
|---|---|
static int |
alwaysCacheInMemory
should never be final
|
| Constructor and Description |
|---|
PdfFileReader() |
| Modifier and Type | Method and Description |
|---|---|
void |
dispose() |
byte[] |
getBuffer()
return pdf data
|
byte[] |
getBytes(long start,
int count) |
DecryptionFactory |
getDecryptionObject() |
byte[] |
getEncHash() |
PdfObject |
getInfoObject() |
long |
getOffset(int currentID) |
int |
getPDFflag(Integer flag)
give user access to internal flags such as user permissions
|
String |
getType()
get pdf type in file (found at start of file)
|
void |
init(RandomAccessBuffer pdf_datafile) |
boolean |
isCompressed(int ref,
int gen)
general routine to turn reference into id with object name
|
void |
movePointer(long pointer)
returns current location pointer and sets to new value
|
void |
readObject(PdfObject pdfObject)
read an object in the pdf into a Object which can be an indirect or an object
|
byte[] |
readObjectAsByteArray(PdfObject pdfObject,
boolean isCompressed,
int objectID,
int gen)
get object as byte[]
|
byte[] |
readObjectData(PdfObject pdfObject)
read an object in the pdf into a Object which can be an indirect or an object
|
byte[] |
readPageIntoStream(PdfObject pdfObject)
get postscript data (which may be split across several objects)
|
PdfObject |
readReferenceTable(PdfObject linearObj,
PdfFileReader pdfFileReader)
read reference table start to see if new 1.5 type or traditional xref
|
byte[] |
readStream(PdfObject pdfObject,
boolean cacheValue,
boolean decompress,
boolean keepRaw,
boolean isMetaData,
boolean isCompressedStream,
String cacheName)
read a stream
|
void |
setCacheSize(int miniumumCacheSize)
set size over which objects kept on disk
|
void |
setCertificate(Certificate certificate,
PrivateKey key) |
void |
setPassword(String password) |
void |
setupDecryption(PdfObject encryptObj,
PdfFileReader pdfFileReader) |
void |
spoolStreamDataToDisk(File tmpFile,
long start) |
void |
spoolStreamDataToDisk(File tmpFile,
long start,
int size) |
void |
storeLinearizedTables(LinearizedHintTable linHintTable) |
public PdfObject getInfoObject()
public void setCacheSize(int miniumumCacheSize)
public byte[] getBuffer()
public void init(RandomAccessBuffer pdf_datafile)
public final void readObject(PdfObject pdfObject)
public final byte[] readStream(PdfObject pdfObject, boolean cacheValue, boolean decompress, boolean keepRaw, boolean isMetaData, boolean isCompressedStream, String cacheName)
public int getPDFflag(Integer flag)
public void spoolStreamDataToDisk(File tmpFile, long start, int size) throws Exception
Exceptionpublic void spoolStreamDataToDisk(File tmpFile, long start) throws Exception
Exceptionpublic long getOffset(int currentID)
public byte[] getBytes(long start,
int count)
public void storeLinearizedTables(LinearizedHintTable linHintTable)
public void dispose()
public final String getType()
public void movePointer(long pointer)
public final boolean isCompressed(int ref,
int gen)
public DecryptionFactory getDecryptionObject()
public void setPassword(String password)
public byte[] readObjectData(PdfObject pdfObject)
public byte[] readObjectAsByteArray(PdfObject pdfObject, boolean isCompressed, int objectID, int gen)
isCompressed - objectID - gen - public byte[] readPageIntoStream(PdfObject pdfObject)
public void setCertificate(Certificate certificate, PrivateKey key)
public final PdfObject readReferenceTable(PdfObject linearObj, PdfFileReader pdfFileReader) throws PdfException
PdfExceptionpublic void setupDecryption(PdfObject encryptObj, PdfFileReader pdfFileReader) throws PdfSecurityException
PdfSecurityExceptionpublic byte[] getEncHash()
Copyright © 2017. All rights reserved.