Table of Contents

Class PdfReader

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll

Reads a PDF document. @author Paulo Soares (psoares@consiste.pt) @author Kazuya Ujihara

public class PdfReader : IPdfViewerPreferences, IDisposable
Inheritance
PdfReader
Implements
Derived
Inherited Members

Constructors

PdfReader()

protected PdfReader()

PdfReader(byte[])

Reads and parses a PDF document. @throws IOException on error

public PdfReader(byte[] pdfIn)

Parameters

pdfIn byte[]

the byte array with the document

PdfReader(byte[], byte[])

Reads and parses a PDF document. @throws IOException on error

public PdfReader(byte[] pdfIn, byte[] ownerPassword)

Parameters

pdfIn byte[]

the byte array with the document

ownerPassword byte[]

the password to read the document

PdfReader(Stream, X509Certificate, ICipherParameters)

Reads and parses a pdf document. It allows working with streams.

public PdfReader(Stream isp, X509Certificate certificate, ICipherParameters certificateKey)

Parameters

isp Stream
certificate X509Certificate
certificateKey ICipherParameters

PdfReader(Stream, bool)

Reads and parses a PDF document. end but is not closed @throws IOException on error

public PdfReader(Stream isp, bool forceRead = true)

Parameters

isp Stream

the InputStream containing the document. The stream is read to the

forceRead bool

force the read of the entire stream, even it's a FileStream

PdfReader(Stream, byte[], bool)

Reads and parses a PDF document. end but is not closed @throws IOException on error

public PdfReader(Stream isp, byte[] ownerPassword, bool forceRead = true)

Parameters

isp Stream

the InputStream containing the document. The stream is read to the

ownerPassword byte[]

the password to read the document

forceRead bool

force the read of the entire stream, even it's a FileStream

PdfReader(string)

Reads and parses a PDF document. @throws IOException on error

public PdfReader(string filename)

Parameters

filename string

the file name of the document

PdfReader(string, X509Certificate, ICipherParameters)

Reads and parses a PDF document. @throws IOException on error

public PdfReader(string filename, X509Certificate certificate, ICipherParameters certificateKey)

Parameters

filename string

the file name of the document

certificate X509Certificate

the certificate to read the document

certificateKey ICipherParameters

the private key of the certificate

PdfReader(string, byte[])

Reads and parses a PDF document. @throws IOException on error

public PdfReader(string filename, byte[] ownerPassword)

Parameters

filename string

the file name of the document

ownerPassword byte[]

the password to read the document

PdfReader(Uri)

Reads and parses a PDF document. @throws IOException on error

public PdfReader(Uri url)

Parameters

url Uri

the Uri of the document

PdfReader(Uri, byte[])

Reads and parses a PDF document. @throws IOException on error

public PdfReader(Uri url, byte[] ownerPassword)

Parameters

url Uri

the Uri of the document

ownerPassword byte[]

the password to read the document

PdfReader(PdfReader)

Creates an independent duplicate.

public PdfReader(PdfReader reader)

Parameters

reader PdfReader

the PdfReader to duplicate

PdfReader(RandomAccessFileOrArray, byte[])

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. @throws IOException on error

public PdfReader(RandomAccessFileOrArray raf, byte[] ownerPassword)

Parameters

raf RandomAccessFileOrArray

the document location

ownerPassword byte[]

the password or null for no password

Fields

AcroFormParsed

protected bool AcroFormParsed

Field Value

bool

AllowOpenWithFullPermissions

Allows reading the pdf file without the owner password.

public static bool AllowOpenWithFullPermissions

Field Value

bool

Certificate

protected X509Certificate Certificate

Field Value

X509Certificate

CertificateKey

protected ICipherParameters CertificateKey

Field Value

ICipherParameters

Encrypted

protected bool Encrypted

Field Value

bool

FreeXref

protected int FreeXref

Field Value

int

NewXrefType

protected bool NewXrefType

Field Value

bool

ObjStmMark

protected INullValueDictionary<int, NullValueDictionary<int, int>> ObjStmMark

Field Value

INullValueDictionary<int, NullValueDictionary<int, int>>

ObjStmToOffset

protected NullValueDictionary<int, int> ObjStmToOffset

Field Value

NullValueDictionary<int, int>

PValue

protected int PValue

Field Value

int

Password

protected byte[] Password

Field Value

byte[]

RValue

protected int RValue

Field Value

int

Rebuilt

protected bool Rebuilt

Field Value

bool

SharedStreams

protected bool SharedStreams

Field Value

bool

Strings

protected List<PdfString> Strings

Field Value

List<PdfString>

Tokens

protected PrTokeniser Tokens

Field Value

PrTokeniser

Xref

Each xref pair is a position

protected int[] Xref

Field Value

int[]

acroForm

protected PrAcroForm acroForm

Field Value

PrAcroForm

catalog

protected PdfDictionary catalog

Field Value

PdfDictionary

consolidateNamedDestinations

protected bool consolidateNamedDestinations

Field Value

bool

decrypt

protected PdfEncryption decrypt

Field Value

PdfEncryption

eofPos

protected int eofPos

Field Value

int

lastXref

protected int lastXref

Field Value

int

pageRefs

protected PdfReader.PageRefs pageRefs

Field Value

PdfReader.PageRefs

pdfVersion

protected char pdfVersion

Field Value

char

tampered

protected bool tampered

Field Value

bool

trailer

protected PdfDictionary trailer

Field Value

PdfDictionary

xrefByteOffset

protected List<int> xrefByteOffset

Field Value

List<int>

Properties

AcroFields

Gets a read-only version of AcroFields .

public AcroFields AcroFields { get; }

Property Value

AcroFields

a read-only version of AcroFields

AcroForm

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

public PrAcroForm AcroForm { get; }

Property Value

PrAcroForm

the document's acroform

Appendable

public bool Appendable { get; set; }

Property Value

bool

Catalog

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

public PdfDictionary Catalog { get; }

Property Value

PdfDictionary

the document's catalog

EofPos

Gets the byte address of the %%EOF marker.

public int EofPos { get; }

Property Value

int

the byte address of the %%EOF marker

FileLength

Getter for property fileLength.

public int FileLength { get; }

Property Value

int

Value of property fileLength.

Info

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

public INullValueDictionary<string, string> Info { get; }

Property Value

INullValueDictionary<string, string>

content of the document information dictionary

IsOpenedWithFullPermissions

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 . false if the document was opened with the user password

public bool IsOpenedWithFullPermissions { get; }

Property Value

bool

true if the document was opened with the owner password or if it's not encrypted,

JavaScript

Gets the global document JavaScript. @throws IOException on error

public string JavaScript { get; }

Property Value

string

the global document JavaScript

LastXref

Gets the byte address of the last xref table.

public int LastXref { get; }

Property Value

int

the byte address of the last xref table

Metadata

Gets the XML metadata. @throws IOException on error

public byte[] Metadata { get; }

Property Value

byte[]

the XML metadata

NumberOfPages

Gets the number of pages in the document.

public int NumberOfPages { get; }

Property Value

int

the number of pages in the document

PdfVersion

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

public char PdfVersion { get; }

Property Value

char

the PDF version

Permissions

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

public int Permissions { get; }

Property Value

int

the encryption permissions

SafeFile

Gets a new file instance of the original PDF document.

public RandomAccessFileOrArray SafeFile { get; }

Property Value

RandomAccessFileOrArray

a new file instance of the original PDF document

SimpleViewerPreferences

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

public virtual int SimpleViewerPreferences { get; }

Property Value

int

an int that contains the Viewer Preferences.

Tampered

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

public bool Tampered { get; set; }

Property Value

bool

Trailer

Gets the trailer dictionary

public PdfDictionary Trailer { get; }

Property Value

PdfDictionary

the trailer dictionary

ViewerPreferences

Sets the viewer preferences as the sum of several constants. @see PdfViewerPreferences#setViewerPreferences

public virtual int ViewerPreferences { set; }

Property Value

int

XrefByteOffset

Gets the byte address of the all xref tables.

public IList<int> XrefByteOffset { get; }

Property Value

IList<int>

the byte address of all the xref tables

XrefSize

Gets the number of xref objects.

public int XrefSize { get; }

Property Value

int

the number of xref objects

Methods

AddPdfObject(PdfObject)

public PrIndirectReference AddPdfObject(PdfObject obj)

Parameters

obj PdfObject

Returns

PrIndirectReference

an indirect reference

AddViewerPreference(PdfName, PdfObject)

Adds a viewer preference @see PdfViewerPreferences#addViewerPreference

public virtual void AddViewerPreference(PdfName key, PdfObject value)

Parameters

key PdfName

a key for a viewer preference

value PdfObject

a value for the viewer preference

Ascii85Decode(byte[])

Decodes a stream that has the ASCII85Decode filter.

public static byte[] Ascii85Decode(byte[] inp)

Parameters

inp byte[]

the input data

Returns

byte[]

the decoded data

AsciiHexDecode(byte[])

Decodes a stream that has the ASCIIHexDecode filter.

public static byte[] AsciiHexDecode(byte[] inp)

Parameters

inp byte[]

the input data

Returns

byte[]

the decoded data

Close()

Closes the reader

public void Close()

ComputeUserPassword()

public byte[] ComputeUserPassword()

Returns

byte[]

ConsolidateNamedDestinations()

Replaces all the local named links with the actual destinations.

public void ConsolidateNamedDestinations()

CreateFakeFontSubsets()

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

public int CreateFakeFontSubsets()

Returns

int

the number of fonts altered

DecodePredictor(byte[], PdfObject)

public static byte[] DecodePredictor(byte[] inp, PdfObject dicPar)

Parameters

inp byte[]
dicPar PdfObject

Returns

byte[]

a byte array

Dispose()

public void Dispose()

DumpPerc()

public double DumpPerc()

Returns

double

the percentage of the cross reference table that has been read

DuplicatePdfDictionary(PdfDictionary, PdfDictionary, PdfReader)

protected static PdfDictionary DuplicatePdfDictionary(PdfDictionary original, PdfDictionary copy, PdfReader newReader)

Parameters

original PdfDictionary
copy PdfDictionary
newReader PdfReader

Returns

PdfDictionary

DuplicatePdfObject(PdfObject, PdfReader)

protected static PdfObject DuplicatePdfObject(PdfObject original, PdfReader newReader)

Parameters

original PdfObject
newReader PdfReader

Returns

PdfObject

EliminateSharedStreams()

Eliminates shared streams if they exist.

public void EliminateSharedStreams()

FlateDecode(byte[])

Decodes a stream that has the FlateDecode filter.

public static byte[] FlateDecode(byte[] inp)

Parameters

inp byte[]

the input data

Returns

byte[]

the decoded data

FlateDecode(byte[], bool)

A helper to FlateDecode. to try to read a corrupted stream

public static byte[] FlateDecode(byte[] inp, bool strict)

Parameters

inp byte[]

the input data

strict bool

true to read a correct stream. false

Returns

byte[]

the decoded data

GetBoxSize(int, string)

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

public Rectangle GetBoxSize(int index, string boxName)

Parameters

index int

the page number. The first page is 1

boxName string

the box name

Returns

Rectangle

the box rectangle or null

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 .

public int GetCertificationLevel()

Returns

int

gets the certification level for this document

GetCropBox(int)

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.

public Rectangle GetCropBox(int index)

Parameters

index int

the page number. The first page is 1

Returns

Rectangle

the crop box

GetCryptoMode()

public int GetCryptoMode()

Returns

int

GetJavaScript(RandomAccessFileOrArray)

Gets the global document JavaScript. @throws IOException on error

public string GetJavaScript(RandomAccessFileOrArray file)

Parameters

file RandomAccessFileOrArray

the document file

Returns

string

the global document JavaScript

public List<PdfAnnotation.PdfImportedLink> GetLinks(int page)

Parameters

page int

Returns

List<PdfAnnotation.PdfImportedLink>

GetNamedDestination()

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

public INullValueDictionary<object, PdfObject> GetNamedDestination()

Returns

INullValueDictionary<object, PdfObject>

gets all the named destinations

GetNamedDestination(bool)

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

public INullValueDictionary<object, PdfObject> GetNamedDestination(bool keepNames)

Parameters

keepNames bool

true if you want the keys to be real PdfNames instead of Strings

Returns

INullValueDictionary<object, PdfObject>

gets all the named destinations

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.

public INullValueDictionary<string, PdfObject> GetNamedDestinationFromNames()

Returns

INullValueDictionary<string, PdfObject>

gets the named destinations

GetNamedDestinationFromNames(bool)

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. @since 2.1.6

public INullValueDictionary<object, PdfObject> GetNamedDestinationFromNames(bool keepNames)

Parameters

keepNames bool

true if you want the keys to be real PdfNames instead of Strings

Returns

INullValueDictionary<object, PdfObject>

gets the named destinations

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.

public INullValueDictionary<string, PdfObject> GetNamedDestinationFromStrings()

Returns

INullValueDictionary<string, PdfObject>

gets the named destinations

GetNormalizedRectangle(PdfArray)

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

public static Rectangle GetNormalizedRectangle(PdfArray box)

Parameters

box PdfArray

the original rectangle

Returns

Rectangle

a normalized Rectangle

GetPageContent(int)

Gets the contents of the page. @throws IOException on error

public byte[] GetPageContent(int pageNum)

Parameters

pageNum int

the page number. 1 is the first

Returns

byte[]

the content

GetPageContent(int, RandomAccessFileOrArray)

Gets the contents of the page. @throws IOException on error

public byte[] GetPageContent(int pageNum, RandomAccessFileOrArray file)

Parameters

pageNum int

the page number. 1 is the first

file RandomAccessFileOrArray

the location of the PDF document

Returns

byte[]

the content

GetPageN(int)

Gets the dictionary that represents a page.

public PdfDictionary GetPageN(int pageNum)

Parameters

pageNum int

the page number. 1 is the first

Returns

PdfDictionary

the page dictionary

GetPageNRelease(int)

public PdfDictionary GetPageNRelease(int pageNum)

Parameters

pageNum int

Returns

PdfDictionary

a Dictionary object

GetPageOrigRef(int)

Gets the page reference to this page.

public PrIndirectReference GetPageOrigRef(int pageNum)

Parameters

pageNum int

the page number. 1 is the first

Returns

PrIndirectReference

the page reference

GetPageRotation(int)

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

public int GetPageRotation(int index)

Parameters

index int

the page number. The first page is 1

Returns

int

the page rotation

GetPageSize(int)

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

public Rectangle GetPageSize(int index)

Parameters

index int

the page number. The first page is 1

Returns

Rectangle

the page size

GetPageSize(PdfDictionary)

Gets the page from a page dictionary

public static Rectangle GetPageSize(PdfDictionary page)

Parameters

page PdfDictionary

the page dictionary

Returns

Rectangle

the page

GetPageSizeWithRotation(int)

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

public Rectangle GetPageSizeWithRotation(int index)

Parameters

index int

the page number. The first page is 1

Returns

Rectangle

a Rectangle

GetPageSizeWithRotation(PdfDictionary)

Gets the rotated page from a page dictionary.

public static Rectangle GetPageSizeWithRotation(PdfDictionary page)

Parameters

page PdfDictionary

the page dictionary

Returns

Rectangle

the rotated page

GetPdfObject(int)

public PdfObject GetPdfObject(int idx)

Parameters

idx int

Returns

PdfObject

aPdfObject

GetPdfObject(PdfObject)

Reads a PdfObject resolving an indirect reference if needed.

public static PdfObject GetPdfObject(PdfObject obj)

Parameters

obj PdfObject

the PdfObject to read

Returns

PdfObject

the resolved PdfObject

GetPdfObject(PdfObject, PdfObject)

public static PdfObject GetPdfObject(PdfObject obj, PdfObject parent)

Parameters

obj PdfObject
parent PdfObject

Returns

PdfObject

a PdfObject

GetPdfObjectRelease(int)

public PdfObject GetPdfObjectRelease(int idx)

Parameters

idx int

Returns

PdfObject

a PdfObject

GetPdfObjectRelease(PdfObject)

public static PdfObject GetPdfObjectRelease(PdfObject obj)

Parameters

obj PdfObject

Returns

PdfObject

a PdfObject

GetPdfObjectRelease(PdfObject, PdfObject)

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.

public static PdfObject GetPdfObjectRelease(PdfObject obj, PdfObject parent)

Parameters

obj PdfObject

the PdfObject to read

parent PdfObject

Returns

PdfObject

a PdfObject

GetPdfReaderInstance(PdfWriter)

protected PdfReaderInstance GetPdfReaderInstance(PdfWriter writer)

Parameters

writer PdfWriter

Returns

PdfReaderInstance

GetStreamBytes(PrStream)

Get the content from a stream applying the required filters. @throws IOException on error

public static byte[] GetStreamBytes(PrStream stream)

Parameters

stream PrStream

the stream

Returns

byte[]

the stream content

GetStreamBytes(PrStream, RandomAccessFileOrArray)

Get the content from a stream applying the required filters. @throws IOException on error

public static byte[] GetStreamBytes(PrStream stream, RandomAccessFileOrArray file)

Parameters

stream PrStream

the stream

file RandomAccessFileOrArray

the location where the stream is

Returns

byte[]

the stream content

GetStreamBytesRaw(PrStream)

Get the content from a stream as it is without applying any filter. @throws IOException on error

public static byte[] GetStreamBytesRaw(PrStream stream)

Parameters

stream PrStream

the stream

Returns

byte[]

the stream content

GetStreamBytesRaw(PrStream, RandomAccessFileOrArray)

Get the content from a stream as it is without applying any filter. @throws IOException on error

public static byte[] GetStreamBytesRaw(PrStream stream, RandomAccessFileOrArray file)

Parameters

stream PrStream

the stream

file RandomAccessFileOrArray

the location where the stream is

Returns

byte[]

the stream content

Is128Key()

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

public bool Is128Key()

Returns

bool

true if the PDF has a 128 bit key encryption

IsEncrypted()

Returns true if the PDF is encrypted.

public bool IsEncrypted()

Returns

bool

true if the PDF is encrypted

IsHybridXref()

Getter for property hybridXref.

public bool IsHybridXref()

Returns

bool

Value of property hybridXref.

IsMetadataEncrypted()

public bool IsMetadataEncrypted()

Returns

bool

IsNewXrefType()

Getter for property newXrefType.

public bool IsNewXrefType()

Returns

bool

Value of property newXrefType.

IsRebuilt()

Checks if the document had errors and was rebuilt.

public bool IsRebuilt()

Returns

bool

true if rebuilt.

KillIndirect(PdfObject)

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

public static PdfObject KillIndirect(PdfObject obj)

Parameters

obj PdfObject

the object. If it's an indirect reference it will be eliminated

Returns

PdfObject

the object or the already erased dereferenced object

KillXref(PdfObject)

protected void KillXref(PdfObject obj)

Parameters

obj PdfObject

LzwDecode(byte[])

Decodes a stream that has the LZWDecode filter.

public static byte[] LzwDecode(byte[] inp)

Parameters

inp byte[]

the input data

Returns

byte[]

the decoded data

ReadArray()

protected PdfArray ReadArray()

Returns

PdfArray

ReadDictionary()

protected PdfDictionary ReadDictionary()

Returns

PdfDictionary

ReadDocObj()

protected void ReadDocObj()

ReadDocObjPartial()

protected void ReadDocObjPartial()

ReadObjStm(PrStream, NullValueDictionary<int, int>)

protected void ReadObjStm(PrStream stream, NullValueDictionary<int, int> map)

Parameters

stream PrStream
map NullValueDictionary<int, int>

ReadOneObjStm(PrStream, int)

protected PdfObject ReadOneObjStm(PrStream stream, int idx)

Parameters

stream PrStream
idx int

Returns

PdfObject

ReadPages()

protected void ReadPages()

ReadPdf()

protected virtual void ReadPdf()

ReadPdfPartial()

protected void ReadPdfPartial()

ReadPrObject()

protected PdfObject ReadPrObject()

Returns

PdfObject

ReadSingleObject(int)

protected PdfObject ReadSingleObject(int k)

Parameters

k int

Returns

PdfObject

ReadXRefStream(int)

protected bool ReadXRefStream(int ptr)

Parameters

ptr int

Returns

bool

ReadXref()

protected void ReadXref()

ReadXrefSection()

protected PdfDictionary ReadXrefSection()

Returns

PdfDictionary

RebuildXref()

protected void RebuildXref()

ReleaseLastXrefPartial()

public void ReleaseLastXrefPartial()

ReleaseLastXrefPartial(PdfObject)

public static void ReleaseLastXrefPartial(PdfObject obj)

Parameters

obj PdfObject

ReleasePage(int)

public void ReleasePage(int pageNum)

Parameters

pageNum int

RemoveAnnotations()

Removes all the annotations and fields from the document.

public void RemoveAnnotations()

RemoveFields()

Removes all the fields from the document.

public void RemoveFields()

RemoveUnusedNode(PdfObject, bool[])

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

Parameters

obj PdfObject
hits bool[]

RemoveUnusedObjects()

Removes all the unreachable objects.

public int RemoveUnusedObjects()

Returns

int

the number of indirect objects removed

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.

public void RemoveUsageRights()

ResetLastXrefPartial()

public void ResetLastXrefPartial()

ResetReleasePage()

public void ResetReleasePage()

SelectPages(ICollection<int>)

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.

public void SelectPages(ICollection<int> pagesToKeep)

Parameters

pagesToKeep ICollection<int>

the pages to keep in the document

SelectPages(string)

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.

public void SelectPages(string ranges)

Parameters

ranges string

the comma separated ranges as described in {@link SequenceList}

SetPageContent(int, byte[])

Sets the contents of the page. @throws IOException on error

public void SetPageContent(int pageNum, byte[] content)

Parameters

pageNum int

the page number. 1 is the first

content byte[]

the new page content

SetPageContent(int, byte[], int)

Sets the contents of the page. @since 2.1.3 (the method already existed without param compressionLevel)

public void SetPageContent(int pageNum, byte[] content, int compressionLevel)

Parameters

pageNum int

the page number. 1 is the first

content byte[]

the new page content

compressionLevel int

ShuffleSubsetNames()

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

public int ShuffleSubsetNames()

Returns

int

the number of font subsets altered

SignaturesCoverWholeDocument()

Return all Signature Names from signatures that cover the whole document. Empty in case no signature covers the whole document.

public IList<string> SignaturesCoverWholeDocument()

Returns

IList<string>

An ArrayList filled with the Signature Names from signatures that covers the whole document.