set_default -- Set a default value for all future operations
bool set_default ( string name, mixed value )
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:
new_page()
. Specifying the page size via this command allows
the parameter to be omitted from calls to new_page()
as well as setting
the page size for any functions that create new pages automatically.
Set the default page size to a5
$pdf->set_default('pagesize', 'a5');
Set the default font to Courier
$pdf->set_default('font', 'Courier');
This command was added in version 2 of the library.
Very little sanity checking is done at this time, so it's easy to set a number of invalid defaults without any warning.