PdfParam Object


PdfParam is a special object encapsulating a series of named numeric and Boolean parameters. It is a collection of PdfParamItem objects representing individual named parameters. It is via the PdfParam object that many AspPDF.NET properties and methods receive their parameters. PdfParam is creatable via PdfManager's CreateParam method. For more information about the PdfParam object, see Section 2.3 - PdfParam Object.

Member List


int Count (Read-only)
Returns the number of PdfParamItem objects in this collection.

float this[string Name] (Read-only)

Returns or sets the value for an item specified by Name. If the specified name is not found, a new item is added to this PdfParam object.


objParam["Alignment"] = 2;

objParam["x"] = objParam["x"] + 20;


void Add(string ParamString)

Adds one or more parameters specified by ParamString to this PdfParam object. A parameter string contains a list of comma- or semicolon-separated Name=Value expressions. Spaces and case of characters are ignored. The order in which items are listed is immaterial.

The Value part of an expression may be an integer or fixed-point float value. Integers may be presented in decimal or hexadecimal formats. Hexadecimal numbers are prefixed with a &H or #. A Value may also be one of the pre-defined constants such as blue (and other colors), true, false, and other values specific to a particular method or property.

If a parameter with the same name already exists in the PdfParam object, it is overwritten with the new value specified in the parameter string.

Examples (all produce the same result):

Param.Add "x=10; y=20; alignment=right; color=blue"
Param.Add "Alignment=1;X=10,Y=20;color=&H0000FF"
Param.Add "color=#0000FF;Alignment=Right, X=10, Y=20"

void Clear()
Clears the collection of all parameter items.

bool IsSet(string Name)
Returns True if a parameter item specified by Name is present in the collection.

void Remove(string Name)
Removes a parameter item specified by Name from the collection.

void Set(string ParamString)

Same as the Add method, but clears the collection before adding new items. Therefore, a call

objParam.Set( "parameter string" );
is equivalent to
objParam.Add( "parameter string" );