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