HiraokaHyperTools.iTextSharp-LGPL  0.2.5
iTextSharp.text.pdf.PdfReader Class Reference
Inheritance diagram for iTextSharp.text.pdf.PdfReader:
iTextSharp.text.pdf.interfaces.IPdfViewerPreferences iTextSharp.text.pdf.FdfReader

Classes

class  PageRefs
 

Public Member Functions

 PdfReader (String filename)
 
 PdfReader (String filename, byte[] ownerPassword)
 
 PdfReader (byte[] pdfIn)
 
 PdfReader (byte[] pdfIn, byte[] ownerPassword)
 
 PdfReader (String filename, X509Certificate certificate, ICipherParameters certificateKey)
 
 PdfReader (Uri url)
 
 PdfReader (Uri url, byte[] ownerPassword)
 
 PdfReader (Stream isp, byte[] ownerPassword)
 
 PdfReader (Stream isp)
 
 PdfReader (RandomAccessFileOrArray raf, byte[] ownerPassword)
 
 PdfReader (PdfReader reader)
 
int GetPageRotation (int index)
 
Rectangle GetPageSizeWithRotation (int index)
 
Rectangle GetPageSizeWithRotation (PdfDictionary page)
 
Rectangle GetPageSize (int index)
 
Rectangle GetPageSize (PdfDictionary page)
 
Rectangle GetCropBox (int index)
 
Rectangle GetBoxSize (int index, String boxName)
 
PdfObject GetPdfObjectRelease (int idx)
 
PdfObject GetPdfObject (int idx)
 
void ResetLastXrefPartial ()
 
void ReleaseLastXrefPartial ()
 
PRIndirectReference AddPdfObject (PdfObject obj)
 
double DumpPerc ()
 
bool IsRebuilt ()
 
PdfDictionary GetPageN (int pageNum)
 
PdfDictionary GetPageNRelease (int pageNum)
 
void ReleasePage (int pageNum)
 
void ResetReleasePage ()
 
PRIndirectReference GetPageOrigRef (int pageNum)
 
byte[] GetPageContent (int pageNum, RandomAccessFileOrArray file)
 
byte[] GetPageContent (int pageNum)
 
void SetPageContent (int pageNum, byte[] content)
 
void SetPageContent (int pageNum, byte[] content, int compressionLevel)
 
void EliminateSharedStreams ()
 
bool IsEncrypted ()
 
bool Is128Key ()
 
int ShuffleSubsetNames ()
 
int CreateFakeFontSubsets ()
 
Hashtable GetNamedDestination ()
 
Hashtable GetNamedDestination (bool keepNames)
 
Hashtable GetNamedDestinationFromNames ()
 
Hashtable GetNamedDestinationFromNames (bool keepNames)
 
Hashtable GetNamedDestinationFromStrings ()
 
void RemoveFields ()
 
void RemoveAnnotations ()
 
ArrayList GetLinks (int page)
 
void ConsolidateNamedDestinations ()
 
void Close ()
 
int RemoveUnusedObjects ()
 
String GetJavaScript (RandomAccessFileOrArray file)
 
void SelectPages (String ranges)
 
void SelectPages (ArrayList pagesToKeep)
 
virtual void AddViewerPreference (PdfName key, PdfObject value)
 
bool IsNewXrefType ()
 
bool IsHybridXref ()
 
void RemoveUsageRights ()
 
int GetCertificationLevel ()
 
int GetCryptoMode ()
 
bool IsMetadataEncrypted ()
 
byte[] ComputeUserPassword ()
 
void Dispose ()
 

Static Public Member Functions

static Rectangle GetNormalizedRectangle (PdfArray box)
 
static PdfObject GetPdfObjectRelease (PdfObject obj)
 
static PdfObject GetPdfObject (PdfObject obj)
 
static PdfObject GetPdfObjectRelease (PdfObject obj, PdfObject parent)
 
static PdfObject GetPdfObject (PdfObject obj, PdfObject parent)
 
static void ReleaseLastXrefPartial (PdfObject obj)
 
static PdfObject KillIndirect (PdfObject obj)
 
static byte[] FlateDecode (byte[] inp)
 
static byte[] DecodePredictor (byte[] inp, PdfObject dicPar)
 
static byte[] FlateDecode (byte[] inp, bool strict)
 
static byte[] ASCIIHexDecode (byte[] inp)
 
static byte[] ASCII85Decode (byte[] inp)
 
static byte[] LZWDecode (byte[] inp)
 
static byte[] GetStreamBytes (PRStream stream, RandomAccessFileOrArray file)
 
static byte[] GetStreamBytes (PRStream stream)
 
static byte[] GetStreamBytesRaw (PRStream stream, RandomAccessFileOrArray file)
 
static byte[] GetStreamBytesRaw (PRStream stream)
 

Protected Attributes

ICipherParameters certificateKey = null
 
X509Certificate certificate = null
 

Properties

RandomAccessFileOrArray SafeFile [get]
 
int NumberOfPages [get]
 
PdfDictionary Catalog [get]
 
PRAcroForm AcroForm [get]
 
Dictionary< string, string > Info [get]
 
bool Tampered [get, set]
 
byte[] Metadata [get]
 
int LastXref [get]
 
int XrefSize [get]
 
int EofPos [get]
 
char PdfVersion [get]
 
int Permissions [get]
 
PdfDictionary Trailer [get]
 
AcroFields AcroFields [get]
 
String JavaScript [get]
 
virtual int ViewerPreferences [set]
 
virtual int SimpleViewerPreferences [get]
 
bool Appendable [get, set]
 
int FileLength [get]
 
bool IsOpenedWithFullPermissions [get]
 
- Properties inherited from iTextSharp.text.pdf.interfaces.IPdfViewerPreferences
int ViewerPreferences [set]
 

Detailed Description

Reads a PDF document.

Author
Paulo Soares (psoar.nosp@m.es@c.nosp@m.onsis.nosp@m.te.p.nosp@m.t)
Kazuya Ujihara

Constructor & Destructor Documentation

◆ PdfReader() [1/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( String  filename)

Reads and parses a PDF document.

Parameters
filenamethe file name of the document
Exceptions
IOExceptionon error

◆ PdfReader() [2/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( String  filename,
byte[]  ownerPassword 
)

Reads and parses a PDF document.

Parameters
filenamethe file name of the document
ownerPasswordthe password to read the document
Exceptions
IOExceptionon error

◆ PdfReader() [3/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( byte[]  pdfIn)

Reads and parses a PDF document.

Parameters
pdfInthe byte array with the document
Exceptions
IOExceptionon error

◆ PdfReader() [4/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( byte[]  pdfIn,
byte[]  ownerPassword 
)

Reads and parses a PDF document.

Parameters
pdfInthe byte array with the document
ownerPasswordthe password to read the document
Exceptions
IOExceptionon error

◆ PdfReader() [5/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( String  filename,
X509Certificate  certificate,
ICipherParameters  certificateKey 
)

Reads and parses a PDF document.

Parameters
filenamethe file name of the document
certificatethe certificate to read the document
certificateKeythe private key of the certificate
certificateKeyProviderthe security provider for certificateKey
Exceptions
IOExceptionon error

◆ PdfReader() [6/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( Uri  url)

Reads and parses a PDF document.

Parameters
urlthe Uri of the document
Exceptions
IOExceptionon error

◆ PdfReader() [7/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( Uri  url,
byte[]  ownerPassword 
)

Reads and parses a PDF document.

Parameters
urlthe Uri of the document
ownerPasswordthe password to read the document
Exceptions
IOExceptionon error

◆ PdfReader() [8/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( Stream  isp,
byte[]  ownerPassword 
)

Reads and parses a PDF document.

Parameters
isthe InputStream containing the document. The stream is read to the end but is not closed
ownerPasswordthe password to read the document
Exceptions
IOExceptionon error

◆ PdfReader() [9/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( Stream  isp)

Reads and parses a PDF document.

Parameters
ispthe InputStream containing the document. The stream is read to the end but is not closed
Exceptions
IOExceptionon error

◆ PdfReader() [10/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( RandomAccessFileOrArray  raf,
byte[]  ownerPassword 
)

Reads and parses a pdf document. Contrary to the other constructors only the xref is read into memory. The reader is said to be working in "partial" mode as only parts of the pdf are read as needed. The pdf is left open but may be closed at any time with PdfReader.Close(), reopen is automatic.

Parameters
rafthe document location
ownerPasswordthe password or null for no password
Exceptions
IOExceptionon error

◆ PdfReader() [11/11]

iTextSharp.text.pdf.PdfReader.PdfReader ( PdfReader  reader)

Creates an independent duplicate.

Parameters
readerthe PdfReader to duplicate

Member Function Documentation

◆ AddPdfObject()

PRIndirectReference iTextSharp.text.pdf.PdfReader.AddPdfObject ( PdfObject  obj)
Parameters
obj
Returns
an indirect reference

◆ AddViewerPreference()

virtual void iTextSharp.text.pdf.PdfReader.AddViewerPreference ( PdfName  key,
PdfObject  value 
)
virtual

Adds a viewer preference

Parameters
keya key for a viewer preference
valuea value for the viewer preference
See also
PdfViewerPreferences::addViewerPreference

Implements iTextSharp.text.pdf.interfaces.IPdfViewerPreferences.

◆ ASCII85Decode()

static byte [] iTextSharp.text.pdf.PdfReader.ASCII85Decode ( byte[]  inp)
static

Decodes a stream that has the ASCII85Decode filter.

Parameters
inthe input data
Returns
the decoded data

◆ ASCIIHexDecode()

static byte [] iTextSharp.text.pdf.PdfReader.ASCIIHexDecode ( byte[]  inp)
static

Decodes a stream that has the ASCIIHexDecode filter.

Parameters
inthe input data
Returns
the decoded data

◆ Close()

void iTextSharp.text.pdf.PdfReader.Close ( )

Closes the reader

◆ ComputeUserPassword()

byte [] iTextSharp.text.pdf.PdfReader.ComputeUserPassword ( )

◆ ConsolidateNamedDestinations()

void iTextSharp.text.pdf.PdfReader.ConsolidateNamedDestinations ( )

Replaces all the local named links with the actual destinations.

◆ CreateFakeFontSubsets()

int iTextSharp.text.pdf.PdfReader.CreateFakeFontSubsets ( )

Finds all the fonts not subset but embedded and marks them as subset.

Returns
the number of fonts altered

◆ DecodePredictor()

static byte [] iTextSharp.text.pdf.PdfReader.DecodePredictor ( byte[]  inp,
PdfObject  dicPar 
)
static
Parameters
in
dicPar
Returns
a byte array

◆ Dispose()

void iTextSharp.text.pdf.PdfReader.Dispose ( )

◆ DumpPerc()

double iTextSharp.text.pdf.PdfReader.DumpPerc ( )
Returns
the percentage of the cross reference table that has been read

◆ EliminateSharedStreams()

void iTextSharp.text.pdf.PdfReader.EliminateSharedStreams ( )

Eliminates shared streams if they exist.

◆ FlateDecode() [1/2]

static byte [] iTextSharp.text.pdf.PdfReader.FlateDecode ( byte[]  inp)
static

Decodes a stream that has the FlateDecode filter.

Parameters
inthe input data
Returns
the decoded data

◆ FlateDecode() [2/2]

static byte [] iTextSharp.text.pdf.PdfReader.FlateDecode ( byte[]  inp,
bool  strict 
)
static

A helper to FlateDecode.

Parameters
inthe input data
stricttrue to read a correct stream. false to try to read a corrupted stream
Returns
the decoded data

◆ GetBoxSize()

Rectangle iTextSharp.text.pdf.PdfReader.GetBoxSize ( int  index,
String  boxName 
)

Gets the box size. Allowed names are: "crop", "trim", "art", "bleed" and "media".

Parameters
indexthe page number. The first page is 1
boxNamethe box name
Returns
the box rectangle or null

◆ GetCertificationLevel()

int iTextSharp.text.pdf.PdfReader.GetCertificationLevel ( )

Gets the certification level for this document. The return values can be PdfSignatureAppearance.NOT_CERTIFIED, PdfSignatureAppearance.CERTIFIED_NO_CHANGES_ALLOWED, PdfSignatureAppearance.CERTIFIED_FORM_FILLING and PdfSignatureAppearance.CERTIFIED_FORM_FILLING_AND_ANNOTATIONS.

No signature validation is made, use the methods availabe for that in AcroFields.

Returns
gets the certification level for this document

◆ GetCropBox()

Rectangle iTextSharp.text.pdf.PdfReader.GetCropBox ( int  index)

Gets the crop box without taking rotation into account. This is the value of the /CropBox key. The crop box is the part of the document to be displayed or printed. It usually is the same as the media box but may be smaller. If the page doesn't have a crop box the page size will be returned.

Parameters
indexthe page number. The first page is 1
Returns
the crop box

◆ GetCryptoMode()

int iTextSharp.text.pdf.PdfReader.GetCryptoMode ( )

◆ GetJavaScript()

String iTextSharp.text.pdf.PdfReader.GetJavaScript ( RandomAccessFileOrArray  file)

Gets the global document JavaScript.

Parameters
filethe document file
Exceptions
IOExceptionon error
Returns
the global document JavaScript

◆ GetLinks()

ArrayList iTextSharp.text.pdf.PdfReader.GetLinks ( int  page)

◆ GetNamedDestination() [1/2]

Hashtable iTextSharp.text.pdf.PdfReader.GetNamedDestination ( )

Gets all the named destinations as an Hashtable. The key is the name and the value is the destinations array.

Returns
gets all the named destinations

◆ GetNamedDestination() [2/2]

Hashtable iTextSharp.text.pdf.PdfReader.GetNamedDestination ( bool  keepNames)

Gets all the named destinations as an HashMap. The key is the name and the value is the destinations array.

Parameters
keepNamestrue if you want the keys to be real PdfNames instead of Strings
Returns
gets all the named destinations
Since
2.1.6

◆ GetNamedDestinationFromNames() [1/2]

Hashtable iTextSharp.text.pdf.PdfReader.GetNamedDestinationFromNames ( )

Gets the named destinations from the /Dests key in the catalog as an Hashtable. The key is the name and the value is the destinations array.

Returns
gets the named destinations

◆ GetNamedDestinationFromNames() [2/2]

Hashtable iTextSharp.text.pdf.PdfReader.GetNamedDestinationFromNames ( bool  keepNames)

Gets the named destinations from the /Dests key in the catalog as an HashMap. The key is the name and the value is the destinations array.

Parameters
keepNamestrue if you want the keys to be real PdfNames instead of Strings
Returns
gets the named destinations
Since
2.1.6

◆ GetNamedDestinationFromStrings()

Hashtable iTextSharp.text.pdf.PdfReader.GetNamedDestinationFromStrings ( )

Gets the named destinations from the /Names key in the catalog as an Hashtable. The key is the name and the value is the destinations array.

Returns
gets the named destinations

◆ GetNormalizedRectangle()

static Rectangle iTextSharp.text.pdf.PdfReader.GetNormalizedRectangle ( PdfArray  box)
static

Normalizes a Rectangle so that llx and lly are smaller than urx and ury.

Parameters
boxthe original rectangle
Returns
a normalized Rectangle

◆ GetPageContent() [1/2]

byte [] iTextSharp.text.pdf.PdfReader.GetPageContent ( int  pageNum)

Gets the contents of the page.

Parameters
pageNumthe page number. 1 is the first
Exceptions
IOExceptionon error
Returns
the content

◆ GetPageContent() [2/2]

byte [] iTextSharp.text.pdf.PdfReader.GetPageContent ( int  pageNum,
RandomAccessFileOrArray  file 
)

Gets the contents of the page.

Parameters
pageNumthe page number. 1 is the first
filethe location of the PDF document
Exceptions
IOExceptionon error
Returns
the content

◆ GetPageN()

PdfDictionary iTextSharp.text.pdf.PdfReader.GetPageN ( int  pageNum)

Gets the dictionary that represents a page.

Parameters
pageNumthe page number. 1 is the first
Returns
the page dictionary

◆ GetPageNRelease()

PdfDictionary iTextSharp.text.pdf.PdfReader.GetPageNRelease ( int  pageNum)
Parameters
pageNum
Returns
a Dictionary object

◆ GetPageOrigRef()

PRIndirectReference iTextSharp.text.pdf.PdfReader.GetPageOrigRef ( int  pageNum)

Gets the page reference to this page.

Parameters
pageNumthe page number. 1 is the first
Returns
the page reference

◆ GetPageRotation()

int iTextSharp.text.pdf.PdfReader.GetPageRotation ( int  index)

Gets the page rotation. This value can be 0, 90, 180 or 270.

Parameters
indexthe page number. The first page is 1
Returns
the page rotation

◆ GetPageSize() [1/2]

Rectangle iTextSharp.text.pdf.PdfReader.GetPageSize ( int  index)

Gets the page size without taking rotation into account. This is the value of the /MediaBox key.

Parameters
indexthe page number. The first page is 1
Returns
the page size

◆ GetPageSize() [2/2]

Rectangle iTextSharp.text.pdf.PdfReader.GetPageSize ( PdfDictionary  page)

Gets the page from a page dictionary

Parameters
pagethe page dictionary
Returns
the page

◆ GetPageSizeWithRotation() [1/2]

Rectangle iTextSharp.text.pdf.PdfReader.GetPageSizeWithRotation ( int  index)

Gets the page size, taking rotation into account. This is a Rectangle with the value of the /MediaBox and the /Rotate key.

Parameters
indexthe page number. The first page is 1
Returns
a Rectangle

◆ GetPageSizeWithRotation() [2/2]

Rectangle iTextSharp.text.pdf.PdfReader.GetPageSizeWithRotation ( PdfDictionary  page)

Gets the rotated page from a page dictionary.

Parameters
pagethe page dictionary
Returns
the rotated page

◆ GetPdfObject() [1/3]

PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObject ( int  idx)
Parameters
idx
Returns
aPdfObject

◆ GetPdfObject() [2/3]

static PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObject ( PdfObject  obj)
static

Reads a PdfObject resolving an indirect reference if needed.

Parameters
objthe PdfObject to read
Returns
the resolved PdfObject

◆ GetPdfObject() [3/3]

static PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObject ( PdfObject  obj,
PdfObject  parent 
)
static
Parameters
obj
parent
Returns
a PdfObject

◆ GetPdfObjectRelease() [1/3]

PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObjectRelease ( int  idx)
Parameters
idx
Returns
a PdfObject

◆ GetPdfObjectRelease() [2/3]

static PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObjectRelease ( PdfObject  obj)
static
Parameters
obj
Returns
a PdfObject

◆ GetPdfObjectRelease() [3/3]

static PdfObject iTextSharp.text.pdf.PdfReader.GetPdfObjectRelease ( PdfObject  obj,
PdfObject  parent 
)
static

Reads a PdfObject resolving an indirect reference if needed. If the reader was opened in partial mode the object will be released to save memory.

Parameters
objthe PdfObject to read
parent
Returns
a PdfObject

◆ GetStreamBytes() [1/2]

static byte [] iTextSharp.text.pdf.PdfReader.GetStreamBytes ( PRStream  stream)
static

Get the content from a stream applying the required filters.

Parameters
streamthe stream
Exceptions
IOExceptionon error
Returns
the stream content

◆ GetStreamBytes() [2/2]

static byte [] iTextSharp.text.pdf.PdfReader.GetStreamBytes ( PRStream  stream,
RandomAccessFileOrArray  file 
)
static

Get the content from a stream applying the required filters.

Parameters
streamthe stream
filethe location where the stream is
Exceptions
IOExceptionon error
Returns
the stream content

◆ GetStreamBytesRaw() [1/2]

static byte [] iTextSharp.text.pdf.PdfReader.GetStreamBytesRaw ( PRStream  stream)
static

Get the content from a stream as it is without applying any filter.

Parameters
streamthe stream
Exceptions
IOExceptionon error
Returns
the stream content

◆ GetStreamBytesRaw() [2/2]

static byte [] iTextSharp.text.pdf.PdfReader.GetStreamBytesRaw ( PRStream  stream,
RandomAccessFileOrArray  file 
)
static

Get the content from a stream as it is without applying any filter.

Parameters
streamthe stream
filethe location where the stream is
Exceptions
IOExceptionon error
Returns
the stream content

◆ Is128Key()

bool iTextSharp.text.pdf.PdfReader.Is128Key ( )

Returns true if the PDF has a 128 bit key encryption.

Returns
true if the PDF has a 128 bit key encryption

◆ IsEncrypted()

bool iTextSharp.text.pdf.PdfReader.IsEncrypted ( )

Returns true if the PDF is encrypted.

Returns
true if the PDF is encrypted

◆ IsHybridXref()

bool iTextSharp.text.pdf.PdfReader.IsHybridXref ( )

Getter for property hybridXref.

Returns
Value of property hybridXref.

◆ IsMetadataEncrypted()

bool iTextSharp.text.pdf.PdfReader.IsMetadataEncrypted ( )

◆ IsNewXrefType()

bool iTextSharp.text.pdf.PdfReader.IsNewXrefType ( )

Getter for property newXrefType.

Returns
Value of property newXrefType.

◆ IsRebuilt()

bool iTextSharp.text.pdf.PdfReader.IsRebuilt ( )

Checks if the document had errors and was rebuilt.

Returns
true if rebuilt.

◆ KillIndirect()

static PdfObject iTextSharp.text.pdf.PdfReader.KillIndirect ( PdfObject  obj)
static

Eliminates the reference to the object freeing the memory used by it and clearing the xref entry.

Parameters
objthe object. If it's an indirect reference it will be eliminated
Returns
the object or the already erased dereferenced object

◆ LZWDecode()

static byte [] iTextSharp.text.pdf.PdfReader.LZWDecode ( byte[]  inp)
static

Decodes a stream that has the LZWDecode filter.

Parameters
inthe input data
Returns
the decoded data

◆ ReleaseLastXrefPartial() [1/2]

void iTextSharp.text.pdf.PdfReader.ReleaseLastXrefPartial ( )

◆ ReleaseLastXrefPartial() [2/2]

static void iTextSharp.text.pdf.PdfReader.ReleaseLastXrefPartial ( PdfObject  obj)
static
Parameters
obj

◆ ReleasePage()

void iTextSharp.text.pdf.PdfReader.ReleasePage ( int  pageNum)
Parameters
pageNum

◆ RemoveAnnotations()

void iTextSharp.text.pdf.PdfReader.RemoveAnnotations ( )

Removes all the annotations and fields from the document.

◆ RemoveFields()

void iTextSharp.text.pdf.PdfReader.RemoveFields ( )

Removes all the fields from the document.

◆ RemoveUnusedObjects()

int iTextSharp.text.pdf.PdfReader.RemoveUnusedObjects ( )

Removes all the unreachable objects.

Returns
the number of indirect objects removed

◆ RemoveUsageRights()

void iTextSharp.text.pdf.PdfReader.RemoveUsageRights ( )

Removes any usage rights that this PDF may have. Only Adobe can grant usage rights and any PDF modification with iText will invalidate them. Invalidated usage rights may confuse Acrobat and it's advisabe to remove them altogether.

◆ ResetLastXrefPartial()

void iTextSharp.text.pdf.PdfReader.ResetLastXrefPartial ( )

◆ ResetReleasePage()

void iTextSharp.text.pdf.PdfReader.ResetReleasePage ( )

◆ SelectPages() [1/2]

void iTextSharp.text.pdf.PdfReader.SelectPages ( ArrayList  pagesToKeep)

Selects the pages to keep in the document. The pages are described as a List of Integer. The page ordering can be changed but no page repetitions are allowed. Note that it may be very slow in partial mode.

Parameters
pagesToKeepthe pages to keep in the document

◆ SelectPages() [2/2]

void iTextSharp.text.pdf.PdfReader.SelectPages ( String  ranges)

Selects the pages to keep in the document. The pages are described as ranges. The page ordering can be changed but no page repetitions are allowed. Note that it may be very slow in partial mode.

Parameters
rangesthe comma separated ranges as described in SequenceList

◆ SetPageContent() [1/2]

void iTextSharp.text.pdf.PdfReader.SetPageContent ( int  pageNum,
byte[]  content 
)

Sets the contents of the page.

Parameters
contentthe new page content
pageNumthe page number. 1 is the first
Exceptions
IOExceptionon error

◆ SetPageContent() [2/2]

void iTextSharp.text.pdf.PdfReader.SetPageContent ( int  pageNum,
byte[]  content,
int  compressionLevel 
)

Sets the contents of the page.

Parameters
contentthe new page content
pageNumthe page number. 1 is the first
Since
2.1.3 (the method already existed without param compressionLevel)

◆ ShuffleSubsetNames()

int iTextSharp.text.pdf.PdfReader.ShuffleSubsetNames ( )

Finds all the font subsets and changes the prefixes to some random values.

Returns
the number of font subsets altered

Member Data Documentation

◆ certificate

X509Certificate iTextSharp.text.pdf.PdfReader.certificate = null
protected

◆ certificateKey

ICipherParameters iTextSharp.text.pdf.PdfReader.certificateKey = null
protected

Property Documentation

◆ AcroFields

AcroFields iTextSharp.text.pdf.PdfReader.AcroFields
get

Gets a read-only version of AcroFields.

Returns
a read-only version of AcroFields

◆ AcroForm

PRAcroForm iTextSharp.text.pdf.PdfReader.AcroForm
get

Returns the document's acroform, if it has one.

Returns
the document's acroform

◆ Appendable

bool iTextSharp.text.pdf.PdfReader.Appendable
getset

◆ Catalog

PdfDictionary iTextSharp.text.pdf.PdfReader.Catalog
get

Returns the document's catalog. This dictionary is not a copy, any changes will be reflected in the catalog.

Returns
the document's catalog

◆ EofPos

int iTextSharp.text.pdf.PdfReader.EofPos
get

Gets the byte address of the %EOF marker.

Returns
the byte address of the %EOF marker

◆ FileLength

int iTextSharp.text.pdf.PdfReader.FileLength
get

Getter for property fileLength.

Returns
Value of property fileLength.

◆ Info

Dictionary<string, string> iTextSharp.text.pdf.PdfReader.Info
get

Returns the content of the document information dictionary as a Hashtable of String.

Returns
content of the document information dictionary

◆ IsOpenedWithFullPermissions

bool iTextSharp.text.pdf.PdfReader.IsOpenedWithFullPermissions
get

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.

Returns
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

◆ JavaScript

String iTextSharp.text.pdf.PdfReader.JavaScript
get

Gets the global document JavaScript.

Exceptions
IOExceptionon error
Returns
the global document JavaScript

◆ LastXref

int iTextSharp.text.pdf.PdfReader.LastXref
get

Gets the byte address of the last xref table.

Returns
the byte address of the last xref table

◆ Metadata

byte [] iTextSharp.text.pdf.PdfReader.Metadata
get

Gets the XML metadata.

Exceptions
IOExceptionon error
Returns
the XML metadata

◆ NumberOfPages

int iTextSharp.text.pdf.PdfReader.NumberOfPages
get

Gets the number of pages in the document.

Returns
the number of pages in the document

◆ PdfVersion

char iTextSharp.text.pdf.PdfReader.PdfVersion
get

Gets the PDF version. Only the last version char is returned. For example version 1.4 is returned as '4'.

Returns
the PDF version

◆ Permissions

int iTextSharp.text.pdf.PdfReader.Permissions
get

Gets the encryption permissions. It can be used directly in PdfWriter.SetEncryption().

Returns
the encryption permissions

◆ SafeFile

RandomAccessFileOrArray iTextSharp.text.pdf.PdfReader.SafeFile
get

Gets a new file instance of the original PDF document.

Returns
a new file instance of the original PDF document

◆ SimpleViewerPreferences

virtual int iTextSharp.text.pdf.PdfReader.SimpleViewerPreferences
get

Returns a bitset representing the PageMode and PageLayout viewer preferences. Doesn't return any information about the ViewerPreferences dictionary.

Returns
an int that contains the Viewer Preferences.

◆ Tampered

bool iTextSharp.text.pdf.PdfReader.Tampered
getset

Sets the tampered state. A tampered PdfReader cannot be reused in PdfStamper.

Parameters
tamperedthe tampered state

◆ Trailer

PdfDictionary iTextSharp.text.pdf.PdfReader.Trailer
get

Gets the trailer dictionary

Returns
the trailer dictionary

◆ ViewerPreferences

virtual int iTextSharp.text.pdf.PdfReader.ViewerPreferences
set

Sets the viewer preferences as the sum of several constants.

Parameters
preferencesthe viewer preferences
See also
PdfViewerPreferences::setViewerPreferences

◆ XrefSize

int iTextSharp.text.pdf.PdfReader.XrefSize
get

Gets the number of xref objects.

Returns
the number of xref objects

The documentation for this class was generated from the following file: