Skip to main content
Skip table of contents

PdfReader (1)

PdfReader Public class

Diagram

  flowchart LR
  classDef interfaceStyle stroke-dasharray: 5 5;
  classDef abstractStyle stroke-width:4px
  subgraph iTextSharp.text.pdf
  iTextSharp.text.pdf.PdfReader[[PdfReader]]
  end
  subgraph iTextSharp.text.pdf.interfaces
  iTextSharp.text.pdf.interfaces.IPdfViewerPreferences[[IPdfViewerPreferences]]
  class iTextSharp.text.pdf.interfaces.IPdfViewerPreferences interfaceStyle;
  end
  subgraph System
System.IDisposable[[IDisposable]]
  end
iTextSharp.text.pdf.interfaces.IPdfViewerPreferences --> iTextSharp.text.pdf.PdfReader
System.IDisposable --> iTextSharp.text.pdf.PdfReader

Members

Properties

Public properties
Internal properties
TypeNameMethods
PdfEncryptionDecryptget

Methods

Protected methods
ReturnsName
ICounterGetCounter()
Internal methods
Protected internal methods
Public methods
Public Static methods
ReturnsName
byte``[]ASCII85Decode(byte``[] inp)
byte``[]ASCIIHexDecode(byte``[] inp)
byte``[]DecodeBytes(...)
byte``[]DecodePredictor(byte``[] inp, PdfObject dicPar)
byte``[]FlateDecode(...)
RectangleGetNormalizedRectangle(PdfArray box)
byte``[]GetPageContent(PdfDictionary page)
PdfObjectGetPdfObject(...)
PdfObjectGetPdfObjectRelease(...)
byte``[]GetStreamBytes(...)
byte``[]GetStreamBytesRaw(...)
PdfObjectKillIndirect(PdfObject obj)
byte``[]LZWDecode(byte``[] inp)
voidReleaseLastXrefPartial(PdfObject obj)
Internal Static methods
ReturnsName
byte``[]ASCII85Decode(byte``[] inp, MemoryStream outp)
byte``[]ASCIIHexDecode(byte``[] inp, MemoryStream outp)
boolEqualsn(byte``[] a1, byte``[] a2)
boolExistsName(PdfDictionary dic, PdfName key, PdfName value)
byte``[]FlateDecode(...)
stringGetFontName(PdfDictionary dic)
stringGetSubsetPrefix(PdfDictionary dic)
byte``[]LZWDecode(byte``[] inp, MemoryStream outp)
Protected internal Static methods

Details

Inheritance

Nested types

Classes
  • PageRefs

Constructors

PdfReader [1/16]
Source code
protected internal PdfReader()
PdfReader [2/16]
Source code
public PdfReader(string filename)
Arguments
TypeNameDescription
stringfilename
PdfReader [3/16]
Source code
public PdfReader(ReaderProperties properties, string filename)
Arguments
TypeNameDescription
ReaderPropertiesproperties
stringfilename
PdfReader [4/16]
Source code
public PdfReader(string filename, byte[] ownerPassword)
Arguments
TypeNameDescription
stringfilename
byte``[]ownerPassword
PdfReader [5/16]
Source code
public PdfReader(string filename, byte[] ownerPassword, bool partial)
Arguments
TypeNameDescription
stringfilename
byte``[]ownerPassword
boolpartial
PdfReader [6/16]
Source code
public PdfReader(byte[] pdfIn)
Arguments
TypeNameDescription
byte``[]pdfIn
PdfReader [7/16]
Source code
public PdfReader(byte[] pdfIn, byte[] ownerPassword)
Arguments
TypeNameDescription
byte``[]pdfIn
byte``[]ownerPassword
PdfReader [8/16]
Source code
public PdfReader(string filename, X509Certificate certificate, ICipherParameters certificateKey)
Arguments
TypeNameDescription
stringfilename
X509Certificatecertificate
ICipherParameterscertificateKey
PdfReader [9/16]
Source code
public PdfReader(Uri url)
Arguments
TypeNameDescription
Uriurl
PdfReader [10/16]
Source code
public PdfReader(Uri url, byte[] ownerPassword)
Arguments
TypeNameDescription
Uriurl
byte``[]ownerPassword
PdfReader [11/16]
Source code
public PdfReader(Stream isp, byte[] ownerPassword)
Arguments
TypeNameDescription
Streamisp
byte``[]ownerPassword
PdfReader [12/16]
Source code
public PdfReader(ReaderProperties properties, Stream isp)
Arguments
TypeNameDescription
ReaderPropertiesproperties
Streamisp
PdfReader [13/16]
Source code
public PdfReader(Stream isp)
Arguments
TypeNameDescription
Streamisp
PdfReader [14/16]
Source code
public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword)
Arguments
TypeNameDescription
RandomAccessFileOrArrayraf
byte``[]ownerPassword
PdfReader [15/16]
Source code
public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword, bool partial)
Arguments
TypeNameDescription
RandomAccessFileOrArrayraf
byte``[]ownerPassword
boolpartial
PdfReader [16/16]
Source code
public PdfReader(PdfReader reader)
Arguments
TypeNameDescription
PdfReaderreader

Methods

GetCounter
Source code
protected virtual ICounter GetCounter()
GetMemoryLimitsAwareHandler
Source code
internal MemoryLimitsAwareHandler GetMemoryLimitsAwareHandler()
GetPdfReaderInstance
Source code
protected internal virtual PdfReaderInstance GetPdfReaderInstance(PdfWriter writer)
Arguments
TypeNameDescription
PdfWriterwriter
GetPageRotation [1/2]
Source code
public virtual int GetPageRotation(int index)
Arguments
TypeNameDescription
intindex
GetPageRotation [2/2]
Source code
internal int GetPageRotation(PdfDictionary page)
Arguments
TypeNameDescription
PdfDictionarypage
GetPageSizeWithRotation [1/2]
Source code
public virtual Rectangle GetPageSizeWithRotation(int index)
Arguments
TypeNameDescription
intindex
GetPageSizeWithRotation [2/2]
Source code
public virtual Rectangle GetPageSizeWithRotation(PdfDictionary page)
Arguments
TypeNameDescription
PdfDictionarypage
GetPageSize [1/2]
Source code
public virtual Rectangle GetPageSize(int index)
Arguments
TypeNameDescription
intindex
GetPageSize [2/2]
Source code
public virtual Rectangle GetPageSize(PdfDictionary page)
Arguments
TypeNameDescription
PdfDictionarypage
GetCropBox
Source code
public virtual Rectangle GetCropBox(int index)
Arguments
TypeNameDescription
intindex
GetBoxSize
Source code
public virtual Rectangle GetBoxSize(int index, string boxName)
Arguments
TypeNameDescription
intindex
stringboxName
GetNormalizedRectangle
Source code
public static Rectangle GetNormalizedRectangle(PdfArray box)
Arguments
TypeNameDescription
PdfArraybox
IsTagged
Source code
public virtual bool IsTagged()
ReadPdf
Source code
protected internal virtual void ReadPdf()
ReadPdfPartial
Source code
protected internal virtual void ReadPdfPartial()
GetPdfObjectRelease [1/3]
Source code
public static PdfObject GetPdfObjectRelease(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
GetPdfObject [1/3]
Source code
public static PdfObject GetPdfObject(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
GetPdfObjectRelease [2/3]
Source code
public static PdfObject GetPdfObjectRelease(PdfObject obj, PdfObject parent)
Arguments
TypeNameDescription
PdfObjectobj
PdfObjectparent
GetPdfObject [2/3]
Source code
public static PdfObject GetPdfObject(PdfObject obj, PdfObject parent)
Arguments
TypeNameDescription
PdfObjectobj
PdfObjectparent
GetPdfObjectRelease [3/3]
Source code
public virtual PdfObject GetPdfObjectRelease(int idx)
Arguments
TypeNameDescription
intidx
GetPdfObject [3/3]
Source code
public virtual PdfObject GetPdfObject(int idx)
Arguments
TypeNameDescription
intidx
ResetLastXrefPartial
Source code
public virtual void ResetLastXrefPartial()
ReleaseLastXrefPartial [1/2]
Source code
public virtual void ReleaseLastXrefPartial()
ReleaseLastXrefPartial [2/2]
Source code
public static void ReleaseLastXrefPartial(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
AddPdfObject
Source code
public virtual PRIndirectReference AddPdfObject(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
ReadPages
Source code
protected internal virtual void ReadPages()
ReadDocObjPartial
Source code
protected internal virtual void ReadDocObjPartial()
ReadSingleObject
Source code
protected internal virtual PdfObject ReadSingleObject(int k)
Arguments
TypeNameDescription
intk
ReadOneObjStm
Source code
protected internal virtual PdfObject ReadOneObjStm(PRStream stream, int idx)
Arguments
TypeNameDescription
PRStreamstream
intidx
DumpPerc
Source code
public virtual double DumpPerc()
ReadDocObj
Source code
protected internal virtual void ReadDocObj()
ReadObjStm
Source code
protected internal virtual void ReadObjStm(PRStream stream, IntHashtable map)
Arguments
TypeNameDescription
PRStreamstream
IntHashtablemap
KillIndirect
Source code
public static PdfObject KillIndirect(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
ReadXref
Source code
protected internal virtual void ReadXref()
ReadXrefSection
Source code
protected internal virtual PdfDictionary ReadXrefSection()
ReadXRefStream
Source code
protected internal virtual bool ReadXRefStream(long ptr)
Arguments
TypeNameDescription
longptr
RebuildXref
Source code
protected internal virtual void RebuildXref()
ReadDictionary
Source code
protected internal virtual PdfDictionary ReadDictionary()
ReadArray
Source code
protected internal virtual PdfArray ReadArray()
ReadPRObject
Source code
protected internal virtual PdfObject ReadPRObject()
FlateDecode [1/4]
Source code
public static byte FlateDecode(byte[] inp)
Arguments
TypeNameDescription
byte``[]inp
FlateDecode [2/4]
Source code
internal static byte FlateDecode(byte[] inp, MemoryStream outS)
Arguments
TypeNameDescription
byte``[]inp
MemoryStreamoutS
DecodePredictor
Source code
public static byte DecodePredictor(byte[] inp, PdfObject dicPar)
Arguments
TypeNameDescription
byte``[]inp
PdfObjectdicPar
FlateDecode [3/4]
Source code
public static byte FlateDecode(byte[] inp, bool strict)
Arguments
TypeNameDescription
byte``[]inp
boolstrict
FlateDecode [4/4]
Source code
internal static byte FlateDecode(byte[] inp, bool strict, MemoryStream outp)
Arguments
TypeNameDescription
byte``[]inp
boolstrict
MemoryStreamoutp
ASCIIHexDecode [1/2]
Source code
public static byte ASCIIHexDecode(byte[] inp)
Arguments
TypeNameDescription
byte``[]inp
ASCIIHexDecode [2/2]
Source code
internal static byte ASCIIHexDecode(byte[] inp, MemoryStream outp)
Arguments
TypeNameDescription
byte``[]inp
MemoryStreamoutp
ASCII85Decode [1/2]
Source code
public static byte ASCII85Decode(byte[] inp)
Arguments
TypeNameDescription
byte``[]inp
ASCII85Decode [2/2]
Source code
internal static byte ASCII85Decode(byte[] inp, MemoryStream outp)
Arguments
TypeNameDescription
byte``[]inp
MemoryStreamoutp
LZWDecode [1/2]
Source code
public static byte LZWDecode(byte[] inp)
Arguments
TypeNameDescription
byte``[]inp
LZWDecode [2/2]
Source code
internal static byte LZWDecode(byte[] inp, MemoryStream outp)
Arguments
TypeNameDescription
byte``[]inp
MemoryStreamoutp
IsRebuilt
Source code
public virtual bool IsRebuilt()
GetPageN
Source code
public virtual PdfDictionary GetPageN(int pageNum)
Arguments
TypeNameDescription
intpageNum
GetPageNRelease
Source code
public virtual PdfDictionary GetPageNRelease(int pageNum)
Arguments
TypeNameDescription
intpageNum
ReleasePage
Source code
public virtual void ReleasePage(int pageNum)
Arguments
TypeNameDescription
intpageNum
ResetReleasePage
Source code
public virtual void ResetReleasePage()
GetPageOrigRef
Source code
public virtual PRIndirectReference GetPageOrigRef(int pageNum)
Arguments
TypeNameDescription
intpageNum
GetPageContent [1/3]
Source code
public virtual byte GetPageContent(int pageNum, RandomAccessFileOrArray file)
Arguments
TypeNameDescription
intpageNum
RandomAccessFileOrArrayfile
GetPageContent [2/3]
Source code
public static byte GetPageContent(PdfDictionary page)
Arguments
TypeNameDescription
PdfDictionarypage
GetPageResources [1/2]
Source code
public virtual PdfDictionary GetPageResources(int pageNum)
Arguments
TypeNameDescription
intpageNum
GetPageResources [2/2]
Source code
public virtual PdfDictionary GetPageResources(PdfDictionary pageDict)
Arguments
TypeNameDescription
PdfDictionarypageDict
GetPageContent [3/3]
Source code
public virtual byte GetPageContent(int pageNum)
Arguments
TypeNameDescription
intpageNum
KillXref
Source code
protected internal virtual void KillXref(PdfObject obj)
Arguments
TypeNameDescription
PdfObjectobj
SetPageContent [1/2]
Source code
public virtual void SetPageContent(int pageNum, byte[] content)
Arguments
TypeNameDescription
intpageNum
byte``[]content
SetPageContent [2/2]
Source code
public virtual void SetPageContent(int pageNum, byte[] content, int compressionLevel, bool killOldXRefRecursively)
Arguments
TypeNameDescription
intpageNum
byte``[]content
intcompressionLevel
boolkillOldXRefRecursively
DecodeBytes [1/2]
Source code
public static byte DecodeBytes(byte[] b, PdfDictionary streamDictionary)
Arguments
TypeNameDescription
byte``[]b
PdfDictionarystreamDictionary
DecodeBytes [2/2]
Source code
public static byte DecodeBytes(byte[] b, PdfDictionary streamDictionary, IDictionary<PdfName, IFilterHandler> filterHandlers)
Arguments
TypeNameDescription
byte``[]b
PdfDictionarystreamDictionary
IDictionary<PdfName, IFilterHandler>filterHandlers
GetStreamBytes [1/2]
Source code
public static byte GetStreamBytes(PRStream stream, RandomAccessFileOrArray file)
Arguments
TypeNameDescription
PRStreamstream
RandomAccessFileOrArrayfile
GetStreamBytes [2/2]
Source code
public static byte GetStreamBytes(PRStream stream)
Arguments
TypeNameDescription
PRStreamstream
GetStreamBytesRaw [1/2]
Source code
public static byte GetStreamBytesRaw(PRStream stream, RandomAccessFileOrArray file)
Arguments
TypeNameDescription
PRStreamstream
RandomAccessFileOrArrayfile
GetStreamBytesRaw [2/2]
Source code
public static byte GetStreamBytesRaw(PRStream stream)
Arguments
TypeNameDescription
PRStreamstream
EliminateSharedStreams
Source code
public virtual void EliminateSharedStreams()
IsEncrypted
Source code
public virtual bool IsEncrypted()
Is128Key
Source code
public virtual bool Is128Key()
Equalsn
Source code
internal static bool Equalsn(byte[] a1, byte[] a2)
Arguments
TypeNameDescription
byte``[]a1
byte``[]a2
ExistsName
Source code
internal static bool ExistsName(PdfDictionary dic, PdfName key, PdfName value)
Arguments
TypeNameDescription
PdfDictionarydic
PdfNamekey
PdfNamevalue
GetFontName
Source code
internal static string GetFontName(PdfDictionary dic)
Arguments
TypeNameDescription
PdfDictionarydic
GetSubsetPrefix
Source code
internal static string GetSubsetPrefix(PdfDictionary dic)
Arguments
TypeNameDescription
PdfDictionarydic
ShuffleSubsetNames
Source code
public virtual int ShuffleSubsetNames()
CreateFakeFontSubsets
Source code
public virtual int CreateFakeFontSubsets()
GetNamedDestination [1/2]
Source code
public virtual Dictionary<object, PdfObject> GetNamedDestination()
GetNamedDestination [2/2]
Source code
public virtual Dictionary<object, PdfObject> GetNamedDestination(bool keepNames)
Arguments
TypeNameDescription
boolkeepNames
GetNamedDestinationFromNames [1/2]
Source code
public virtual Dictionary<string, PdfObject> GetNamedDestinationFromNames()
GetNamedDestinationFromNames [2/2]
Source code
public virtual Dictionary<object, PdfObject> GetNamedDestinationFromNames(bool keepNames)
Arguments
TypeNameDescription
boolkeepNames
GetNamedDestinationFromStrings
Source code
public virtual Dictionary<string, PdfObject> GetNamedDestinationFromStrings()
RemoveFields
Source code
public virtual void RemoveFields()
RemoveAnnotations
Source code
public virtual void RemoveAnnotations()
Source code
public virtual List<PdfImportedLink> GetLinks(int page)
Arguments
TypeNameDescription
intpage
MakeRemoteNamedDestinationsLocal
Source code
public virtual void MakeRemoteNamedDestinationsLocal()
ConsolidateNamedDestinations
Source code
public virtual void ConsolidateNamedDestinations()
DuplicatePdfDictionary
Source code
protected internal static PdfDictionary DuplicatePdfDictionary(PdfDictionary original, PdfDictionary copy, PdfReader newReader)
Arguments
TypeNameDescription
PdfDictionaryoriginal
PdfDictionarycopy
PdfReadernewReader
DuplicatePdfObject
Source code
protected internal static PdfObject DuplicatePdfObject(PdfObject original, PdfReader newReader)
Arguments
TypeNameDescription
PdfObjectoriginal
PdfReadernewReader
Close
Source code
public virtual void Close()
RemoveUnusedNode
Source code
protected internal virtual void RemoveUnusedNode(PdfObject obj, bool[] hits)
Arguments
TypeNameDescription
PdfObjectobj
bool``[]hits
RemoveUnusedObjects
Source code
public virtual int RemoveUnusedObjects()
GetJavaScript
Source code
public virtual string GetJavaScript(RandomAccessFileOrArray file)
Arguments
TypeNameDescription
RandomAccessFileOrArrayfile
SelectPages [1/3]
Source code
public virtual void SelectPages(string ranges)
Arguments
TypeNameDescription
stringranges
SelectPages [2/3]
Source code
public virtual void SelectPages(ICollection<int> pagesToKeep)
Arguments
TypeNameDescription
ICollection<int>pagesToKeep
SelectPages [3/3]
Source code
internal void SelectPages(ICollection<int> pagesToKeep, bool removeUnused)
Arguments
TypeNameDescription
ICollection<int>pagesToKeep
boolremoveUnused
AddViewerPreference
Source code
public virtual void AddViewerPreference(PdfName key, PdfObject value)
Arguments
TypeNameDescription
PdfNamekey
PdfObjectvalue
SetViewerPreferences
Source code
public virtual void SetViewerPreferences(PdfViewerPreferencesImp vp)
Arguments
TypeNameDescription
PdfViewerPreferencesImpvp
IsNewXrefType
Source code
public virtual bool IsNewXrefType()
IsHybridXref
Source code
public virtual bool IsHybridXref()
GetCryptoRef
Source code
internal PdfIndirectReference GetCryptoRef()
HasUsageRights
Source code
public virtual bool HasUsageRights()
RemoveUsageRights
Source code
public virtual void RemoveUsageRights()
GetCertificationLevel
Source code
public virtual int GetCertificationLevel()
GetCryptoMode
Source code
public virtual int GetCryptoMode()
IsMetadataEncrypted
Source code
public virtual bool IsMetadataEncrypted()
ComputeUserPassword
Source code
public virtual byte ComputeUserPassword()
Dispose
Source code
public virtual void Dispose()

Properties

SafeFile
public virtual RandomAccessFileOrArray SafeFile { get; }
NumberOfPages
public virtual int NumberOfPages { get; }
Catalog
public virtual PdfDictionary Catalog { get; }
AcroForm
public virtual PRAcroForm AcroForm { get; }
Info
public virtual Dictionary<string, string> Info { get; }
Tampered
public virtual bool Tampered { get; set; }
Metadata
public virtual byte Metadata { get; }
LastXref
public virtual long LastXref { get; }
XrefSize
public virtual int XrefSize { get; }
EofPos
public virtual long EofPos { get; }
PdfVersion
public virtual char PdfVersion { get; }
Permissions
public virtual long Permissions { get; }
Trailer
public virtual PdfDictionary Trailer { get; }
Decrypt
internal PdfEncryption Decrypt { get; }
AcroFields
public virtual AcroFields AcroFields { get; }
JavaScript
public virtual string JavaScript { get; }
ViewerPreferences
public virtual int ViewerPreferences { set; }
SimpleViewerPreferences
public virtual int SimpleViewerPreferences { get; }
Appendable
public virtual bool Appendable { get; set; }
FileLength
public virtual long FileLength { get; }
IsOpenedWithFullPermissions
public bool IsOpenedWithFullPermissions { get; }

Generated with ModularDoc

JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.