Table of Contents

Class PrStream

Namespace
iTextSharp.text.pdf
Assembly
iTextSharp.LGPLv2.Core.dll
public class PrStream : PdfStream
Inheritance
PrStream
Inherited Members

Constructors

PrStream(PdfReader, byte[])

public PrStream(PdfReader reader, byte[] conts)

Parameters

reader PdfReader
conts byte[]

PrStream(PdfReader, byte[], int)

Creates a new PDF stream object that will replace a stream in a existing PDF file. @since 2.1.3 (replacing the existing constructor without param compressionLevel)

public PrStream(PdfReader reader, byte[] conts, int compressionLevel)

Parameters

reader PdfReader

the reader that holds the existing PDF

conts byte[]

the new content

compressionLevel int

the compression level for the content

PrStream(PdfReader, int)

public PrStream(PdfReader reader, int offset)

Parameters

reader PdfReader
offset int

PrStream(PrStream, PdfDictionary)

public PrStream(PrStream stream, PdfDictionary newDic)

Parameters

stream PrStream
newDic PdfDictionary

PrStream(PrStream, PdfDictionary, PdfReader)

public PrStream(PrStream stream, PdfDictionary newDic, PdfReader reader)

Parameters

stream PrStream
newDic PdfDictionary
reader PdfReader

Fields

length

protected int length

Field Value

int

objGen

protected int objGen

Field Value

int

objNum

added by ujihara for decryption

protected int objNum

Field Value

int

offset

protected int offset

Field Value

int

reader

protected PdfReader reader

Field Value

PdfReader

Properties

Length

public int Length { get; set; }

Property Value

int

ObjGen

public int ObjGen { get; set; }

Property Value

int

ObjNum

public int ObjNum { get; set; }

Property Value

int

Offset

public int Offset { get; }

Property Value

int

Reader

public PdfReader Reader { get; }

Property Value

PdfReader

Methods

GetBytes()

public byte[] GetBytes()

Returns

byte[]

SetData(byte[])

Sets the data associated with the stream

public void SetData(byte[] data)

Parameters

data byte[]

raw data, decrypted and uncompressed.

SetData(byte[], bool)

Sets the data associated with the stream, either compressed or uncompressed. Note that the data will never be compressed if Document.compress is set to false. @since iText 2.1.1

public void SetData(byte[] data, bool compress)

Parameters

data byte[]

raw data, decrypted and uncompressed.

compress bool

true if you want the stream to be compresssed.

SetData(byte[], bool, int)

Sets the data associated with the stream, either compressed or uncompressed. Note that the data will never be compressed if Document.compress is set to false. @since iText 2.1.3

public void SetData(byte[] data, bool compress, int compressionLevel)

Parameters

data byte[]

raw data, decrypted and uncompressed.

compress bool

true if you want the stream to be compresssed.

compressionLevel int

a value between -1 and 9 (ignored if compress == false)

ToPdf(PdfWriter, Stream)

public override void ToPdf(PdfWriter writer, Stream os)

Parameters

writer PdfWriter
os Stream