PDFStream Class Documentation

classPDFStream : PDFObject

Namespace:Datalogics::PDFL

Inherits from:
PDFObject

Detailed Description

Represents a stream of data within a PDF document.

All objects in a PDF document are built from a collection of simpler objects that represent fundamental datatypes like numbers, strings and arrays.

PDFObject and its subclasses allow direct access and manipulation of these simple objects. Some subclasses represent single data elements (e.g. PDFInteger represents a single integer value); other subclasses represent a collection of PDFObjects (e.g. PDFArray is an indexed array of data elements).

A PDFStream represents a stream of unsigned bytes, and may be inserted into any collection object. It includes a dictionary that describes how the data in the stream is encoded and other useful information about the stream. A PDFStream is always an indirect object.

PDFStreams can be encoded using built-in filters. These filters include compression schemes for most popular image formats, and text encoding translators to permit safe transmission of the document over the Internet. The data in a PDFStream will be automatically encoded when it is created; the user can read either the encoded (raw) or decoded (filtered) data.

PDFStreams can be used for any large collection of data that need not be read into memory all at once, including image data, multimedia data or XML markup.

Constructor & Destructor Documentation

PDFStream

PDFStream(PDFStreamrhs, InternalConstructsignifier)

Parameters

signifier: InternalConstruct

PDFStream

PDFStream(System.IO.Streamstream, Documentdoc, PDFDictencoding_dict, PDFArrayencoding_params)

Parameters

stream: System.IO.Stream

System.IO.Stream which will provide data for this PDFStream

doc: Document

Document object containing this PDFStream

encoding_dict: PDFDict

PDFDict describing properties of this stream, including the encoding

encoding_params: PDFArray

PDFArray describing parameters for encoding this stream

General constructor

PDFStream

PDFStream(System.IO.Streamstream, PDFObjectdocFromObj, PDFDictencoding_dict, PDFArrayencoding_params)

Parameters

stream: System.IO.Stream

System.IO.Stream which will provide data for this PDFStream

docFromObj: PDFObject

The new PDFArray will be created in the same document as this object.

encoding_dict: PDFDict

PDFDict describing properties of this stream, including the encoding

encoding_params: PDFArray

PDFArray describing parameters for encoding this stream

General constructor

Property Documentation

Dict

PDFDictDict[get]

Document

DocumentDocument[get]

FilteredStream

System.IO.StreamFilteredStream[get]

Generation

intGeneration[get]

ID

intID[get]

Indirect

boolIndirect[get]

Length

intLength[get]

PDFHashValue

intPDFHashValue[get]

StreamPos

intStreamPos[get]

UnfilteredStream

System.IO.StreamUnfilteredStream[get]

Member Function Documentation

Clone

PDFObjectClone()

Returns:

PDFObject

Makes a new copy of this PDFObject in memory, in the same document and using same direct/indirect setting as this PDFObject.

Clone

Parameters

Returns:

PDFObject

Makes a new copy of this PDFObject in memory, in the supplied document, using the same direct/indirect setting as this PDFObject.

Clone

PDFObjectClone(Documentdoc, boolindirect)

Parameters

indirect: bool

Returns:

PDFObject

Makes a new copy of this PDFObject in memory, in the supplied document, using supplied direct/indirect setting.

Clone

Parameters

Returns:

PDFObject

Makes a new copy of this PDFObject in memory, in the same document as another object, using the same direct/indirect setting as this PDFObject.

Clone

PDFObjectClone(PDFObjectobj, boolindirect)

Parameters

indirect: bool

Returns:

PDFObject

Makes a new copy of this PDFObject in memory, in the same document as another object, using supplied direct/indirect setting.

CompareTo

Parameters

rhs: PDFObject

the other PDFObject to compare.

Returns:

A PDFObjectComparison value that relates this object to the rhs object

Compares this object to another object. The result is useful for ordering or sorting PDFObjects. No other significance should be attached to the result. In particular, an unequal result indicates nothing about the type of either object.

The result is valid only within a single instance of the document.

ConstructorRetrieve

static new static PDFStreamConstructorRetrieve(System.IntPtrignored)

Parameters

ignored: System.IntPtr

Returns:

new static PDFStream

Destroy

voidDestroy()

Returns:

void

Destroys this object.

This method does nothing if this object is a direct scalar object.

If a composite object (an array, dictionary or stream) is destroyed:

All the direct objects in it are automatically destroyed.

The indirect objects in it are not destroyed.

Dispose

voidDispose()

Returns:

void

DisposeChildren

voidDisposeChildren()

Returns:

void

EnumPDFObjects

boolEnumPDFObjects(PDFObjectEnumProcenumProc)

Parameters

enumProc: PDFObjectEnumProc

A user-supplied callback to call for each element of the object. of obj. Neither proc nor any routine called by proc may modify the object. Doing so can produce undefined results or errors. For example, if the object is an array, enumProc must not call Remove(); if the object is a dictionary, enumProc must not call Put().

Returns:

Returns true if every call to enumProc returned true. As soon as any call to enumProc returns false, the enumeration stops and EnumPDFObject() returns false.

Enumerates the elements of a PDFObject by calling a user-supplied procedure for each component of the object.

For scalars or strings, the proc is not called, and CosObjEnum() returns true.

For dictionaries, proc is called for each key-value pair. The order in which the key-value pairs are enumerated is undefined.

For arrays, proc is called with each element as the first paramater to proc, and the NULL object as the second parameter. Array elements are enumerated in ascending order of index.

For streams, proc is called once, with the stream's dictionary as the first parameter to the proc and the NULL object as the second parameter.

Equals

override boolEquals(objectobj)

Parameters

obj: object

Returns:

override bool

GetFilteredStream

System.IO.StreamGetFilteredStream()

Returns:

System.IO.Stream

The stream data of this object, decoded according to the filter data in its dictionary.

GetStream

System.IO.StreamGetStream(PDFStreamOpenModemode)

Parameters

Returns:

System.IO.Stream

The stream data of this object, processed according to the mode

GetUnfilteredStream

System.IO.StreamGetUnfilteredStream()

Returns:

System.IO.Stream

The unfiltered data of this stream object.

SameTypeEquals

boolSameTypeEquals(PDFObjectarg0)

Parameters

arg0: PDFObject

Returns:

bool

SetData

voidSetData(System.IO.Streamstream, PDFDictencoding_dict, PDFArrayencoding_params)

Parameters

stream: System.IO.Stream
encoding_dict: PDFDict
encoding_params: PDFArray

Returns:

void

Replace the data in this PDFStream

SetDataInternal

voidSetDataInternal(BaseInputNozzlenozzle, PDFDictencoding_dict, PDFArrayencoding_params)

Parameters

nozzle: BaseInputNozzle
encoding_dict: PDFDict
encoding_params: PDFArray

Returns:

void

ToString

override stringToString()

Returns:

override string

fromCPtr

static PDFObjectfromCPtr(System.IntPtrfromCPtrParm)

Parameters

fromCPtrParm: System.IntPtr

Returns:

PDFObject