iText 8.0.5 API
|
Reads a PDF document. More...
Classes |
|
class | ReusableRandomAccessSource |
class | StrictnessLevel |
Enumeration representing the strictness level for reading. More... |
|
Public Member Functions |
|
PdfReader (IRandomAccessSource byteSource, ReaderProperties properties) | |
Constructs a new PdfReader. More... |
|
PdfReader (Stream @is, ReaderProperties properties) | |
Reads and parses a PDF document. More... |
|
PdfReader (FileInfo file) | |
Reads and parses a PDF document. More... |
|
PdfReader (Stream @is) | |
Reads and parses a PDF document. More... |
|
PdfReader (String filename, ReaderProperties properties) | |
Reads and parses a PDF document. More... |
|
PdfReader (String filename) | |
Reads and parses a PDF document. More... |
|
PdfReader (FileInfo file, ReaderProperties properties) | |
Reads and parses a PDF document. More... |
|
virtual void | Close () |
Close iText.IO.Source.PdfTokenizer. More... |
|
virtual iText.Kernel.Pdf.PdfReader | SetUnethicalReading (bool unethicalReading) |
The iText is not responsible if you decide to change the value of this parameter. More... |
|
virtual iText.Kernel.Pdf.PdfReader | SetMemorySavingMode (bool memorySavingMode) |
Defines if memory saving mode is enabled. More... |
|
virtual PdfReader.StrictnessLevel | GetStrictnessLevel () |
Get the current StrictnessLevel of the reader. More... |
|
virtual iText.Kernel.Pdf.PdfReader | SetStrictnessLevel (PdfReader.StrictnessLevel strictnessLevel) |
Set the StrictnessLevel for the reader. More... |
|
virtual bool | IsCloseStream () |
Gets whether Close() method shall close input stream. More... |
|
virtual void | SetCloseStream (bool closeStream) |
Sets whether Close() method shall close input stream. More... |
|
virtual bool | HasRebuiltXref () |
If any exception generated while reading XRef section, PdfReader will try to rebuild it. More... |
|
virtual bool | HasHybridXref () |
Some documents contain hybrid XRef, for more information see "7.5.8.4 Compatibility with Applications That Do Not Support Compressed Reference Streams" in PDF 32000-1:2008 spec. More... |
|
virtual bool | HasXrefStm () |
Indicates whether the document has Cross-Reference Streams. More... |
|
virtual bool | HasFixedXref () |
If any exception generated while reading PdfObject, PdfReader will try to fix offsets of all objects. More... |
|
virtual long | GetLastXref () |
Gets position of the last Cross-Reference table. More... |
|
virtual byte[] | ReadStreamBytes (PdfStream stream, bool decode) |
Reads, decrypt and optionally decode stream bytes. More... |
|
virtual byte[] | ReadStreamBytesRaw (PdfStream stream) |
Reads and decrypt stream bytes. More... |
|
virtual Stream | ReadStream (PdfStream stream, bool decode) |
Reads, decrypts and optionally decodes stream bytes into System.IO.MemoryStream. More... |
|
virtual RandomAccessFileOrArray | GetSafeFile () |
Gets a new file instance of the original PDF document. More... |
|
virtual long | GetFileLength () |
Provides the size of the opened file. More... |
|
virtual bool | IsOpenedWithFullPermission () |
Checks if the document was opened with the owner password so that the end application can decide what level of access restrictions to apply. More... |
|
virtual long | GetPermissions () |
Gets the encryption permissions. More... |
|
virtual int | GetCryptoMode () |
Gets encryption algorithm and access permissions. More... |
|
virtual PdfAConformanceLevel | GetPdfAConformanceLevel () |
Gets the declared PDF/A conformance level of the source document that is being read. More... |
|
virtual byte[] | ComputeUserPassword () |
Computes user password if standard encryption handler is used with Standard40, Standard128 or AES128 encryption algorithm. More... |
|
virtual byte[] | GetOriginalFileId () |
Gets original file ID, the first element in PdfName.ID key of trailer. More... |
|
virtual byte[] | GetModifiedFileId () |
Gets modified file ID, the second element in PdfName.ID key of trailer. More... |
|
virtual bool | IsEncrypted () |
Checks if the PdfDocument read with this PdfReader is encrypted. More... |
|
Static Public Member Functions |
|
static byte[] | DecodeBytes (byte[] b, PdfDictionary streamDictionary) |
Decode bytes applying the filters specified in the provided dictionary using default filter handlers. More... |
|
static byte[] | DecodeBytes (byte[] b, PdfDictionary streamDictionary, IDictionary< PdfName, IFilterHandler > filterHandlers) |
Decode a byte[] applying the filters specified in the provided dictionary using the provided filter handlers. More... |
|
Static Public Attributes |
|
static readonly PdfReader.StrictnessLevel | DEFAULT_STRICTNESS_LEVEL = PdfReader.StrictnessLevel.LENIENT |
The default StrictnessLevel to be used. More... |
|
Package Functions |
|
virtual void | ReadPdf () |
Parses the entire PDF More... |
|
virtual void | ReadObjectStream (PdfStream objectStream) |
virtual PdfObject | ReadObject (PdfIndirectReference reference) |
virtual PdfObject | ReadObject (bool readAsDirect) |
virtual PdfObject | ReadReference (bool readAsDirect) |
virtual PdfObject | ReadObject (bool readAsDirect, bool objStm) |
virtual PdfName | ReadPdfName (bool readAsDirect) |
virtual PdfDictionary | ReadDictionary (bool objStm) |
virtual PdfArray | ReadArray (bool objStm) |
virtual void | ReadXref () |
virtual PdfDictionary | ReadXrefSection () |
virtual bool | ReadXrefStream (long ptr) |
virtual void | FixXref () |
virtual void | RebuildXref () |
virtual PdfNumber | GetXrefPrev (PdfObject prevObjectToCheck) |
Package Attributes |
|
PdfTokenizer | tokens |
PdfEncryption | decrypt |
PdfVersion | headerPdfVersion |
long | lastXref |
long | eofPos |
PdfDictionary | trailer |
PdfDocument | pdfDocument |
PdfAConformanceLevel | pdfAConformanceLevel |
ReaderProperties | properties |
bool | encrypted = false |
bool | rebuiltXref = false |
bool | hybridXref = false |
bool | fixedXref = false |
bool | xrefStm = false |
Static Package Attributes |
|
static bool | correctStreamLength = true |
Reads a PDF document.
|
inline |
Constructs a new PdfReader.
byteSource | source of bytes for the reader |
properties | properties of the created reader |
|
inline |
Reads and parses a PDF document.
is | the InputStream containing the document. If the inputStream is an instance of iText.IO.Source.RASInputStream then the iText.IO.Source.IRandomAccessSource would be extracted. Otherwise the stream is read to the end but is not closed. |
properties | properties of the created reader |
|
inline |
Reads and parses a PDF document.
file | the File containing the document. |
|
inline |
Reads and parses a PDF document.
is | the InputStream containing the document. If the inputStream is an instance of iText.IO.Source.RASInputStream then the iText.IO.Source.IRandomAccessSource would be extracted. Otherwise the stream is read to the end but is not closed. |
|
inline |
Reads and parses a PDF document.
filename | the file name of the document |
properties | properties of the created reader |
|
inline |
Reads and parses a PDF document.
filename | the file name of the document |
|
inline |
Reads and parses a PDF document.
file | the file of the document |
properties | properties of the created reader |
|
inlinevirtual |
Close iText.IO.Source.PdfTokenizer.
|
inlinevirtual |
Computes user password if standard encryption handler is used with Standard40, Standard128 or AES128 encryption algorithm.
|
inlinestatic |
Decode bytes applying the filters specified in the provided dictionary using default filter handlers.
b | the bytes to decode |
streamDictionary | the dictionary that contains filter information |
|
inlinestatic |
Decode a byte[] applying the filters specified in the provided dictionary using the provided filter handlers.
b | the bytes to decode |
streamDictionary | the dictionary that contains filter information |
filterHandlers | the map used to look up a handler for each type of filter |
|
inlinevirtual |
Gets encryption algorithm and access permissions.
int
value corresponding to a certain type of encryption.
|
inlinevirtual |
Provides the size of the opened file.
|
inlinevirtual |
Gets position of the last Cross-Reference table.
|
inlinevirtual |
Gets modified file ID, the second element in PdfName.ID key of trailer.
Gets modified file ID, the second element in PdfName.ID key of trailer. If the size of ID array does not equal 2, an empty array will be returned.
The returned value reflects the value that was written in opened document. If document is modified, the ultimate document id can be retrieved from PdfDocument.GetModifiedDocumentId().
|
inlinevirtual |
Gets original file ID, the first element in PdfName.ID key of trailer.
Gets original file ID, the first element in PdfName.ID key of trailer. If the size of ID array does not equal 2, an empty array will be returned.
The returned value reflects the value that was written in opened document. If document is modified, the ultimate document id can be retrieved from PdfDocument.GetOriginalDocumentId().
|
inlinevirtual |
Gets the declared PDF/A conformance level of the source document that is being read.
Gets the declared PDF/A conformance level of the source document that is being read. Note that this information is provided via XMP metadata and is not verified by iText. pdfAConformanceLevel is lazy initialized. It will be initialized during the first call of this method.
null
if no PDF/A conformance level information is specified.
|
inlinevirtual |
Gets the encryption permissions.
Gets the encryption permissions. It can be used directly in WriterProperties.SetStandardEncryption(byte[], byte[], int, int). See ISO 32000-1, Table 22 for more details.
|
inlinevirtual |
Gets a new file instance of the original PDF document.
|
inlinevirtual |
Get the current StrictnessLevel of the reader.
|
inlinevirtual |
If any exception generated while reading PdfObject, PdfReader will try to fix offsets of all objects.
If any exception generated while reading PdfObject, PdfReader will try to fix offsets of all objects.
This method's returned value might change over time, because PdfObjects reading can be postponed even up to document closing.
|
inlinevirtual |
Some documents contain hybrid XRef, for more information see "7.5.8.4 Compatibility with Applications That Do Not Support Compressed Reference Streams" in PDF 32000-1:2008 spec.
|
inlinevirtual |
|
inlinevirtual |
Indicates whether the document has Cross-Reference Streams.
|
inlinevirtual |
|
inlinevirtual |
Checks if the PdfDocument read with this PdfReader is encrypted.
true
is the document is encrypted, otherwise false
.
|
inlinevirtual |
Checks if the document was opened with the owner password so that the end application can decide what level of access restrictions to apply.
Checks if the document was opened with the owner password so that the end application can decide what level of access restrictions to apply. If the document is not encrypted it will return true
.
true
if the document was opened with the owner password or if it's not encrypted, false
if the document was opened with the user password.
|
inlinepackagevirtual |
Parses the entire PDF
|
inlinevirtual |
Reads, decrypts and optionally decodes stream bytes into System.IO.MemoryStream.
Reads, decrypts and optionally decodes stream bytes into System.IO.MemoryStream. User is responsible for closing returned stream.
stream | a PdfStream stream instance to be read |
decode | true if to get decoded stream, false if to leave it originally encoded. |
null
if reading was failed.
|
inlinevirtual |
Reads, decrypt and optionally decode stream bytes.
Reads, decrypt and optionally decode stream bytes. Note, this method doesn't store actual bytes in any internal structures.
stream | a PdfStream stream instance to be read and optionally decoded. |
decode | true if to get decoded stream bytes, false if to leave it originally encoded. |
|
inlinevirtual |
Reads and decrypt stream bytes.
Reads and decrypt stream bytes. Note, this method doesn't store actual bytes in any internal structures.
stream | a PdfStream stream instance to be read |
|
inlinevirtual |
|
inlinevirtual |
Defines if memory saving mode is enabled.
Defines if memory saving mode is enabled.
By default memory saving mode is disabled for the sake of time–memory trade-off.
If memory saving mode is enabled, document processing might slow down, but reading will be less memory demanding.
memorySavingMode | true to enable memory saving mode, false to disable it. |
|
inlinevirtual |
Set the StrictnessLevel for the reader.
Set the StrictnessLevel for the reader. If the argument is null
, then the DEFAULT_STRICTNESS_LEVEL will be used.
strictnessLevel | the StrictnessLevel to set |
|
inlinevirtual |
|
static |
The default StrictnessLevel to be used.