iText 5

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

Type

Name

Methods

PdfEncryption

Decrypt

get

Methods

Protected methods

Returns

Name

ICounter

GetCounter

()

Internal methods
Protected internal methods
Public methods

Returns

Name

PRIndirectReference

AddPdfObject

(

PdfObject

obj)

void

AddViewerPreference

(

PdfName

key,

PdfObject

value)

void

Close

()

byte``[]

ComputeUserPassword

()

void

ConsolidateNamedDestinations

()

int

CreateFakeFontSubsets

()

void

Dispose

()

double

DumpPerc

()

void

EliminateSharedStreams

()

Rectangle

GetBoxSize

(int index, string boxName)

int

GetCertificationLevel

()

Rectangle

GetCropBox

(int index)

int

GetCryptoMode

()

string

GetJavaScript

(

RandomAccessFileOrArray

file)

List<PdfImportedLink>

GetLinks

(int page)

Dictionary<object,

PdfObject

>

GetNamedDestination

(...)

Dictionary<string,

PdfObject

>

GetNamedDestinationFromNames

(...)

Dictionary<string,

PdfObject

>

GetNamedDestinationFromStrings

()

byte``[]

GetPageContent

(...)

PdfDictionary

GetPageN

(int pageNum)

PdfDictionary

GetPageNRelease

(int pageNum)

PRIndirectReference

GetPageOrigRef

(int pageNum)

PdfDictionary

GetPageResources

(...)

int

GetPageRotation

(int index)

Rectangle

GetPageSize

(...)

Rectangle

GetPageSizeWithRotation

(...)

PdfObject

GetPdfObject

(int idx)

PdfObject

GetPdfObjectRelease

(int idx)

bool

HasUsageRights

()

bool

Is128Key

()

bool

IsEncrypted

()

bool

IsHybridXref

()

bool

IsMetadataEncrypted

()

bool

IsNewXrefType

()

bool

IsRebuilt

()

bool

IsTagged

()

void

MakeRemoteNamedDestinationsLocal

()

void

ReleaseLastXrefPartial

()

void

ReleasePage

(int pageNum)

void

RemoveAnnotations

()

void

RemoveFields

()

int

RemoveUnusedObjects

()

void

RemoveUsageRights

()

void

ResetLastXrefPartial

()

void

ResetReleasePage

()

void

SelectPages

(...)

void

SetPageContent

(...)

void

SetViewerPreferences

(

PdfViewerPreferencesImp

vp)

int

ShuffleSubsetNames

()

Public Static methods
Internal Static methods

Returns

Name

byte``[]

ASCII85Decode

(byte``[] inp, MemoryStream outp)

byte``[]

ASCIIHexDecode

(byte``[] inp, MemoryStream outp)

bool

Equalsn

(byte``[] a1, byte``[] a2)

bool

ExistsName

(

PdfDictionary

dic,

PdfName

key,

PdfName

value)

byte``[]

FlateDecode

(...)

string

GetFontName

(

PdfDictionary

dic)

string

GetSubsetPrefix

(

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

Type

Name

Description

string

filename

PdfReader [3/16]

Source code

public PdfReader(ReaderProperties properties, string filename)

Arguments

Type

Name

Description

ReaderProperties

properties

string

filename

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

Type

Name

Description

ReaderProperties

properties

Stream

isp

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

Type

Name

Description

RandomAccessFileOrArray

raf

byte``[]

ownerPassword

PdfReader [15/16]

Source code

public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword, bool partial)

Arguments

Type

Name

Description

RandomAccessFileOrArray

raf

byte``[]

ownerPassword

bool

partial

PdfReader [16/16]

Source code

public PdfReader(PdfReader reader)

Arguments

Type

Name

Description

PdfReader

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

PdfWriter

writer

GetPageRotation [1/2]

Source code

public virtual int GetPageRotation(int index)

Arguments

Type

Name

Description

int

index

GetPageRotation [2/2]

Source code

internal int GetPageRotation(PdfDictionary page)

Arguments

Type

Name

Description

PdfDictionary

page

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

Type

Name

Description

PdfDictionary

page

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

Type

Name

Description

PdfDictionary

page

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

Type

Name

Description

PdfArray

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

PdfObject

obj

GetPdfObject [1/3]

Source code

public static PdfObject GetPdfObject(PdfObject obj)

Arguments

Type

Name

Description

PdfObject

obj

GetPdfObjectRelease [2/3]

Source code

public static PdfObject GetPdfObjectRelease(PdfObject obj, PdfObject parent)

Arguments

Type

Name

Description

PdfObject

obj

PdfObject

parent

GetPdfObject [2/3]

Source code

public static PdfObject GetPdfObject(PdfObject obj, PdfObject parent)

Arguments

Type

Name

Description

PdfObject

obj

PdfObject

parent

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

Type

Name

Description

PdfObject

obj

AddPdfObject

Source code

public virtual PRIndirectReference AddPdfObject(PdfObject obj)

Arguments

Type

Name

Description

PdfObject

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

int

k

ReadOneObjStm

Source code

protected internal virtual PdfObject ReadOneObjStm(PRStream stream, int idx)

Arguments

Type

Name

Description

PRStream

stream

int

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

PRStream

stream

IntHashtable

map

KillIndirect

Source code

public static PdfObject KillIndirect(PdfObject obj)

Arguments

Type

Name

Description

PdfObject

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

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

Type

Name

Description

int

pageNum

RandomAccessFileOrArray

file

GetPageContent [2/3]

Source code

public static byte GetPageContent(PdfDictionary page)

Arguments

Type

Name

Description

PdfDictionary

page

GetPageResources [1/2]

Source code

public virtual PdfDictionary GetPageResources(int pageNum)

Arguments

Type

Name

Description

int

pageNum

GetPageResources [2/2]

Source code

public virtual PdfDictionary GetPageResources(PdfDictionary pageDict)

Arguments

Type

Name

Description

PdfDictionary

pageDict

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

Type

Name

Description

PdfObject

obj

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

Type

Name

Description

byte``[]

b

PdfDictionary

streamDictionary

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

Type

Name

Description

PRStream

stream

RandomAccessFileOrArray

file

GetStreamBytes [2/2]

Source code

public static byte GetStreamBytes(PRStream stream)

Arguments

Type

Name

Description

PRStream

stream

GetStreamBytesRaw [1/2]

Source code

public static byte GetStreamBytesRaw(PRStream stream, RandomAccessFileOrArray file)

Arguments

Type

Name

Description

PRStream

stream

RandomAccessFileOrArray

file

GetStreamBytesRaw [2/2]

Source code

public static byte GetStreamBytesRaw(PRStream stream)

Arguments

Type

Name

Description

PRStream

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

byte``[]

a1

byte``[]

a2

ExistsName

Source code

internal static bool ExistsName(PdfDictionary dic, PdfName key, PdfName value)

Arguments

Type

Name

Description

PdfDictionary

dic

PdfName

key

PdfName

value

GetFontName

Source code

internal static string GetFontName(PdfDictionary dic)

Arguments

Type

Name

Description

PdfDictionary

dic

GetSubsetPrefix

Source code

internal static string GetSubsetPrefix(PdfDictionary dic)

Arguments

Type

Name

Description

PdfDictionary

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

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()

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

Type

Name

Description

PdfDictionary

original

PdfDictionary

copy

PdfReader

newReader

DuplicatePdfObject

Source code

protected internal static PdfObject DuplicatePdfObject(PdfObject original, PdfReader newReader)

Arguments

Type

Name

Description

PdfObject

original

PdfReader

newReader

Close

Source code

public virtual void Close()

RemoveUnusedNode

Source code

protected internal virtual void RemoveUnusedNode(PdfObject obj, bool[] hits)

Arguments

Type

Name

Description

PdfObject

obj

bool``[]

hits

RemoveUnusedObjects

Source code

public virtual int RemoveUnusedObjects()

GetJavaScript

Source code

public virtual string GetJavaScript(RandomAccessFileOrArray file)

Arguments

Type

Name

Description

RandomAccessFileOrArray

file

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

Type

Name

Description

PdfName

key

PdfObject

value

SetViewerPreferences

Source code

public virtual void SetViewerPreferences(PdfViewerPreferencesImp vp)

Arguments

Type

Name

Description

PdfViewerPreferencesImp

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