|
Gnostice PDFOne
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.gnostice.pdfone.PdfReader
For internal use only.
This class is used in conjunction with theDo not use this class anymore for reading existing PDF documents. Starting with v3.5.2, document reading capabilities are available in
PdfDocument
class itself. The documentation provided here is only to support old user code.
PdfDocument
class to read and/or modify an existing PDF document. When creating
PdfWriter
object, an input document and an output
document needs to be specified. To simply read an existing
document, it is enough to create a PdfReader
object
with just the input document. To make modifications to the
document, an output document also has to be specified. The
PdfDocument
object created with the
PdfReader
can then be used to access the documents
contents and make modifications if any.
PdfDocument
Field Summary |
Method Summary | |
PdfObject |
dereferObjectFDF(int objNo)
|
void |
dispose()
Closes all input/output (I/O) streams associated with this PdfReader . |
static PdfReader |
fileReader(File inFile)
Returns a new PdfReader object created with
specified File object as its input document. |
static PdfReader |
fileReader(File inFile,
OutputStream os)
Returns a new PdfReader object created with
specified File object as its input document and
specified OutputStream object for its output
document. |
static PdfReader |
fileReader(File inFile,
String outFilePath)
Returns a new PdfReader object created with
specified File object as its input document and
specified pathname for its output document. |
static PdfReader |
fileReader(String inFilePath)
Returns a new PdfReader object created with
input document specified by its pathname. |
static PdfReader |
fileReader(String inFilePath,
OutputStream os)
Returns a new PdfReader object created with
input document specified by its pathname and output document
specified by java.io.OutputStream object
os . |
static PdfReader |
fileReader(String inFilePath,
String outFilePath)
Returns a new PdfReader object created with
input and output documents specified by their pathnames. |
static PdfReader |
fileReaderFDF(File file)
|
static PdfReader |
fileStreamReader(FileInputStream fis)
Returns a new PdfReader object created with the
specified FileInputStream object as its input
document. |
static PdfReader |
fileStreamReader(FileInputStream fis,
OutputStream os)
Returns a new PdfReader object created with
specified FileInputStream object as its input document
and specified OutputStream object as its output
document. |
static PdfReader |
fileStreamReader(FileInputStream fis,
String outFilePath)
Returns a new PdfReader object created with
input document specified FileInputStream object
fis and output document specified by its
pathname. |
static PdfReader |
fileStreamReader(InputStream is)
|
String |
getInputFileName()
Returns file name of the input document for this PdfWriter object. |
String |
getInputFilepath()
Returns path to the location of the input document for this PdfWriter object. |
String |
getOutFilePath()
Retrieves pathname of the file currently set as output stream for this PdfReader . |
OutputStream |
getOutputStream()
Retrieves OutputStream object currently set as
output stream for this PdfReader . |
static PdfReader |
memoryReader(byte[] byteArray)
Returns a new PdfReader object created with
specified byte array as input document. |
static PdfReader |
memoryReader(byte[] byteArray,
OutputStream os)
Returns a new PdfReader object created with
specified byte array as input document and specified
OutputStream object for the output document. |
static PdfReader |
memoryReader(byte[] byteArray,
String outFilePath)
Returns a new PdfReader object created with
specified byte array as input document and specified pathname
for the output document. |
PdfDict |
parseTrailerFdf(long offSet)
|
void |
setOnPageReadHandler(PdfPageReadHandler onPageReadHandler)
Deprecated. |
void |
setOnPasswordHandler(PdfPasswordHandler onPasswordHandler)
Deprecated. |
void |
setOutFilePath(String outFilePath)
Sets file specified by pathname outFilePath as
output stream for this PdfReader . |
void |
setOutputStream(OutputStream os)
Sets specified OutputStream object as output
stream for this PdfReader . |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
public void dispose() throws IOException
PdfReader
.
IOException
- An input/output error has occurred.public static PdfReader fileReader(String inFilePath) throws IOException
PdfReader
object created with
input document specified by its pathname.
inFilePath
- pathname of the document that needs to be read
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input document.
inFile
- File
object containing the document
that needs to be read
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis) throws IOException, PdfException
PdfReader
object created with the
specified FileInputStream
object as its input
document.
fis
- FileInputStream
object containing
the document that needs to be read
PdfReader
object
IOException
- if an input/output exception has occurred.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(InputStream is) throws IOException, PdfException
IOException
PdfException
public static PdfReader memoryReader(byte[] byteArray) throws IOException, PdfException
PdfReader
object created with
specified byte array as input document.
byteArray
- byte array containing the document that needs to be
read
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileReader(String inFilePath, String outFilePath) throws IOException
PdfReader
object created with
input and output documents specified by their pathnames.
inFilePath
- pathname of the document that needs to be readoutFilePath
- pathname where the output document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile, String outFilePath) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input document and
specified pathname for its output document.
inFile
- File
object containing the document
that needs to be readoutFilePath
- pathname where the output document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis, String outFilePath) throws IOException, PdfException
PdfReader
object created with
input document specified FileInputStream
object
fis
and output document specified by its
pathname.
fis
- FileInputStream
object containing
the document that needs to be readoutFilePath
- pathname where the output document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader memoryReader(byte[] byteArray, String outFilePath) throws IOException, PdfException
PdfReader
object created with
specified byte array as input document and specified pathname
for the output document.
byteArray
- byte array containing the document that needs to be
readoutFilePath
- pathname where the output document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader fileReader(String inFilePath, OutputStream os) throws IOException
PdfReader
object created with
input document specified by its pathname and output document
specified by java.io.OutputStream
object
os
.
inFilePath
- pathname of the file that needs to be used as the
input streamos
- OutputStream
object of the output
stream
PdfReader
object
IOException
- if an I/O error occurs.public static PdfReader fileReader(File inFile, OutputStream os) throws IOException, PdfException
PdfReader
object created with
specified File
object as its input document and
specified OutputStream
object for its output
document.
inFile
- File
object containing the document
that needs to be reados
- OutputStream
object stream where the
output document needs to be saved
PdfReader
object
IOException
- if an input/output exception had occurred.
PdfException
- if an illegal argument is supplied.public static PdfReader fileStreamReader(FileInputStream fis, OutputStream os) throws IOException, PdfException
PdfReader
object created with
specified FileInputStream
object as its input document
and specified OutputStream
object as its output
document.
fis
- FileInputStream
object containing
the document that needs to be reados
- OutputStream
object where the output
document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public static PdfReader memoryReader(byte[] byteArray, OutputStream os) throws IOException, PdfException
PdfReader
object created with
specified byte array as input document and specified
OutputStream
object for the output document.
byteArray
- byte array containing the document that needs to be
reados
- stream where the output document needs to be saved
PdfReader
object
IOException
- if an I/O error occurs.
PdfException
- if an illegal argument is supplied.public OutputStream getOutputStream()
OutputStream
object currently set as
output stream for this PdfReader
.
OutputStream
object currently set as
the output streampublic void setOutputStream(OutputStream os)
OutputStream
object as output
stream for this PdfReader
.
os
- OutputStream
object that needs to
be set as the output streampublic String getOutFilePath()
PdfReader
.
public void setOutFilePath(String outFilePath)
outFilePath
as
output stream for this PdfReader
.
outFilePath
- pathname of the file that needs to be set as the
output streampublic void setOnPasswordHandler(PdfPasswordHandler onPasswordHandler)
onPasswordHandler
- public void setOnPageReadHandler(PdfPageReadHandler onPageReadHandler)
onPageReadHandler
- public PdfObject dereferObjectFDF(int objNo) throws PdfException, IOException
PdfException
IOException
public static PdfReader fileReaderFDF(File file) throws IOException
IOException
public PdfDict parseTrailerFdf(long offSet) throws IOException, PdfException
IOException
PdfException
public String getInputFilepath()
PdfWriter
object.
public String getInputFileName()
PdfWriter
object.
|
Pro. Ed. v5.0.0 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |