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
Methods
Protected methods
Internal methods
Protected internal methods
Public methods
Public Static methods
Internal Static methods
Protected internal Static methods
Details
Inheritance
Nested types
Classes
Constructors
PdfReader [1/16]
Source code
protected internal PdfReader()
PdfReader [2/16]
Source code
public PdfReader(string filename)
Arguments
Type | Name | Description |
---|
string | filename | |
PdfReader [3/16]
Source code
public PdfReader(ReaderProperties properties, string filename)
Arguments
PdfReader [4/16]
Source code
public PdfReader(string filename, byte[] ownerPassword)
Arguments
Type | Name | Description |
---|
string | filename | |
byte``[] | ownerPassword | |
PdfReader [5/16]
Source code
public PdfReader(string filename, byte[] ownerPassword, bool partial)
Arguments
Type | Name | Description |
---|
string | filename | |
byte``[] | ownerPassword | |
bool | partial | |
PdfReader [6/16]
Source code
public PdfReader(byte[] pdfIn)
Arguments
Type | Name | Description |
---|
byte``[] | pdfIn | |
PdfReader [7/16]
Source code
public PdfReader(byte[] pdfIn, byte[] ownerPassword)
Arguments
Type | Name | Description |
---|
byte``[] | pdfIn | |
byte``[] | ownerPassword | |
PdfReader [8/16]
Source code
public PdfReader(string filename, X509Certificate certificate, ICipherParameters certificateKey)
Arguments
Type | Name | Description |
---|
string | filename | |
X509Certificate | certificate | |
ICipherParameters | certificateKey | |
PdfReader [9/16]
Source code
public PdfReader(Uri url)
Arguments
Type | Name | Description |
---|
Uri | url | |
PdfReader [10/16]
Source code
public PdfReader(Uri url, byte[] ownerPassword)
Arguments
Type | Name | Description |
---|
Uri | url | |
byte``[] | ownerPassword | |
PdfReader [11/16]
Source code
public PdfReader(Stream isp, byte[] ownerPassword)
Arguments
Type | Name | Description |
---|
Stream | isp | |
byte``[] | ownerPassword | |
PdfReader [12/16]
Source code
public PdfReader(ReaderProperties properties, Stream isp)
Arguments
PdfReader [13/16]
Source code
public PdfReader(Stream isp)
Arguments
Type | Name | Description |
---|
Stream | isp | |
PdfReader [14/16]
Source code
public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword)
Arguments
PdfReader [15/16]
Source code
public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword, bool partial)
Arguments
PdfReader [16/16]
Source code
public PdfReader(PdfReader reader)
Arguments
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
Source code
public virtual int GetPageRotation(int index)
Arguments
Type | Name | Description |
---|
int | index | |
Source code
internal int GetPageRotation(PdfDictionary page)
Arguments
GetPageSizeWithRotation [1/2]
Source code
public virtual Rectangle GetPageSizeWithRotation(int index)
Arguments
Type | Name | Description |
---|
int | index | |
GetPageSizeWithRotation [2/2]
Source code
public virtual Rectangle GetPageSizeWithRotation(PdfDictionary page)
Arguments
GetPageSize [1/2]
Source code
public virtual Rectangle GetPageSize(int index)
Arguments
Type | Name | Description |
---|
int | index | |
GetPageSize [2/2]
Source code
public virtual Rectangle GetPageSize(PdfDictionary page)
Arguments
GetCropBox
Source code
public virtual Rectangle GetCropBox(int index)
Arguments
Type | Name | Description |
---|
int | index | |
GetBoxSize
Source code
public virtual Rectangle GetBoxSize(int index, string boxName)
Arguments
Type | Name | Description |
---|
int | index | |
string | boxName | |
GetNormalizedRectangle
Source code
public static Rectangle GetNormalizedRectangle(PdfArray box)
Arguments
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
GetPdfObject [1/3]
Source code
public static PdfObject GetPdfObject(PdfObject obj)
Arguments
GetPdfObjectRelease [2/3]
Source code
public static PdfObject GetPdfObjectRelease(PdfObject obj, PdfObject parent)
Arguments
GetPdfObject [2/3]
Source code
public static PdfObject GetPdfObject(PdfObject obj, PdfObject parent)
Arguments
GetPdfObjectRelease [3/3]
Source code
public virtual PdfObject GetPdfObjectRelease(int idx)
Arguments
Type | Name | Description |
---|
int | idx | |
GetPdfObject [3/3]
Source code
public virtual PdfObject GetPdfObject(int idx)
Arguments
Type | Name | Description |
---|
int | idx | |
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
AddPdfObject
Source code
public virtual PRIndirectReference AddPdfObject(PdfObject obj)
Arguments
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
ReadOneObjStm
Source code
protected internal virtual PdfObject ReadOneObjStm(PRStream stream, int idx)
Arguments
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
KillIndirect
Source code
public static PdfObject KillIndirect(PdfObject obj)
Arguments
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
Type | Name | Description |
---|
long | ptr | |
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
Type | Name | Description |
---|
byte``[] | inp | |
FlateDecode [2/4]
Source code
internal static byte FlateDecode(byte[] inp, MemoryStream outS)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
MemoryStream | outS | |
DecodePredictor
Source code
public static byte DecodePredictor(byte[] inp, PdfObject dicPar)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
PdfObject | dicPar | |
FlateDecode [3/4]
Source code
public static byte FlateDecode(byte[] inp, bool strict)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
bool | strict | |
FlateDecode [4/4]
Source code
internal static byte FlateDecode(byte[] inp, bool strict, MemoryStream outp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
bool | strict | |
MemoryStream | outp | |
ASCIIHexDecode [1/2]
Source code
public static byte ASCIIHexDecode(byte[] inp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
ASCIIHexDecode [2/2]
Source code
internal static byte ASCIIHexDecode(byte[] inp, MemoryStream outp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
MemoryStream | outp | |
ASCII85Decode [1/2]
Source code
public static byte ASCII85Decode(byte[] inp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
ASCII85Decode [2/2]
Source code
internal static byte ASCII85Decode(byte[] inp, MemoryStream outp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
MemoryStream | outp | |
LZWDecode [1/2]
Source code
public static byte LZWDecode(byte[] inp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
LZWDecode [2/2]
Source code
internal static byte LZWDecode(byte[] inp, MemoryStream outp)
Arguments
Type | Name | Description |
---|
byte``[] | inp | |
MemoryStream | outp | |
IsRebuilt
Source code
public virtual bool IsRebuilt()
GetPageN
Source code
public virtual PdfDictionary GetPageN(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
GetPageNRelease
Source code
public virtual PdfDictionary GetPageNRelease(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
ReleasePage
Source code
public virtual void ReleasePage(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
ResetReleasePage
Source code
public virtual void ResetReleasePage()
GetPageOrigRef
Source code
public virtual PRIndirectReference GetPageOrigRef(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
GetPageContent [1/3]
Source code
public virtual byte GetPageContent(int pageNum, RandomAccessFileOrArray file)
Arguments
GetPageContent [2/3]
Source code
public static byte GetPageContent(PdfDictionary page)
Arguments
Source code
public virtual PdfDictionary GetPageResources(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
Source code
public virtual PdfDictionary GetPageResources(PdfDictionary pageDict)
Arguments
GetPageContent [3/3]
Source code
public virtual byte GetPageContent(int pageNum)
Arguments
Type | Name | Description |
---|
int | pageNum | |
KillXref
Source code
protected internal virtual void KillXref(PdfObject obj)
Arguments
SetPageContent [1/2]
Source code
public virtual void SetPageContent(int pageNum, byte[] content)
Arguments
Type | Name | Description |
---|
int | pageNum | |
byte``[] | content | |
SetPageContent [2/2]
Source code
public virtual void SetPageContent(int pageNum, byte[] content, int compressionLevel, bool killOldXRefRecursively)
Arguments
Type | Name | Description |
---|
int | pageNum | |
byte``[] | content | |
int | compressionLevel | |
bool | killOldXRefRecursively | |
DecodeBytes [1/2]
Source code
public static byte DecodeBytes(byte[] b, PdfDictionary streamDictionary)
Arguments
DecodeBytes [2/2]
Source code
public static byte DecodeBytes(byte[] b, PdfDictionary streamDictionary, IDictionary<PdfName, IFilterHandler> filterHandlers)
Arguments
Type | Name | Description |
---|
byte``[] | b | |
PdfDictionary | streamDictionary | |
IDictionary <PdfName , IFilterHandler > | filterHandlers | |
GetStreamBytes [1/2]
Source code
public static byte GetStreamBytes(PRStream stream, RandomAccessFileOrArray file)
Arguments
GetStreamBytes [2/2]
Source code
public static byte GetStreamBytes(PRStream stream)
Arguments
GetStreamBytesRaw [1/2]
Source code
public static byte GetStreamBytesRaw(PRStream stream, RandomAccessFileOrArray file)
Arguments
GetStreamBytesRaw [2/2]
Source code
public static byte GetStreamBytesRaw(PRStream stream)
Arguments
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
Type | Name | Description |
---|
byte``[] | a1 | |
byte``[] | a2 | |
ExistsName
Source code
internal static bool ExistsName(PdfDictionary dic, PdfName key, PdfName value)
Arguments
GetFontName
Source code
internal static string GetFontName(PdfDictionary dic)
Arguments
GetSubsetPrefix
Source code
internal static string GetSubsetPrefix(PdfDictionary dic)
Arguments
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
Type | Name | Description |
---|
bool | keepNames | |
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
Type | Name | Description |
---|
bool | keepNames | |
GetNamedDestinationFromStrings
Source code
public virtual Dictionary<string, PdfObject> GetNamedDestinationFromStrings()
RemoveFields
Source code
public virtual void RemoveFields()
RemoveAnnotations
Source code
public virtual void RemoveAnnotations()
GetLinks
Source code
public virtual List<PdfImportedLink> GetLinks(int page)
Arguments
Type | Name | Description |
---|
int | page | |
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
DuplicatePdfObject
Source code
protected internal static PdfObject DuplicatePdfObject(PdfObject original, PdfReader newReader)
Arguments
Close
Source code
public virtual void Close()
RemoveUnusedNode
Source code
protected internal virtual void RemoveUnusedNode(PdfObject obj, bool[] hits)
Arguments
RemoveUnusedObjects
Source code
public virtual int RemoveUnusedObjects()
GetJavaScript
Source code
public virtual string GetJavaScript(RandomAccessFileOrArray file)
Arguments
SelectPages [1/3]
Source code
public virtual void SelectPages(string ranges)
Arguments
Type | Name | Description |
---|
string | ranges | |
SelectPages [2/3]
Source code
public virtual void SelectPages(ICollection<int> pagesToKeep)
Arguments
Type | Name | Description |
---|
ICollection <int > | pagesToKeep | |
SelectPages [3/3]
Source code
internal void SelectPages(ICollection<int> pagesToKeep, bool removeUnused)
Arguments
Type | Name | Description |
---|
ICollection <int > | pagesToKeep | |
bool | removeUnused | |
AddViewerPreference
Source code
public virtual void AddViewerPreference(PdfName key, PdfObject value)
Arguments
SetViewerPreferences
Source code
public virtual void SetViewerPreferences(PdfViewerPreferencesImp vp)
Arguments
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()
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; }
public virtual PRAcroForm AcroForm { get; }
Info
public virtual Dictionary<string, string> Info { get; }
Tampered
public virtual bool Tampered { get; set; }
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