Name

set_default -- Set a default value for all future operations

Synopsis

bool set_default ( string name, mixed value )

Description

Use this function to set default values that all subsequent functions will use. Parameters set in this manner become the new default values and are used whenever a parameter is not specified in the parameters array of a function.

There are two exceptions to this behaviour:

Examples

Set the default page size to a5

$pdf->set_default('pagesize', 'a5');

Set the default font to Courier

$pdf->set_default('font', 'Courier');

See Also

History

This command was added in version 2 of the library.

Bugs

Very little sanity checking is done at this time, so it's easy to set a number of invalid defaults without any warning.