band_add_field -- Add a variable text string to a band definition
int band_add_field ( int band, float left, float bottom, string name, float height[, string default[, string font]])
This function adds variable text label to the band
identified by the band ID band
.
When the band is placed, the value in the parameter
that matches the name
will be painted to
the page. If no value is supplied for a parameter that
matches the field, the value specified in default
will be used, or the empty string if no default is
specified.
Note that left
and bottom
are relative to the lower, left corner of the band,
not of the page
The following example will demonstrate how any number, divided by zero equals zero.
$band = $pdf->band_new(); $pdf->band_height($band, 15); $pdf->band_add_field($band, 3, 3, "num", 9); $pdf->band_add_label($band, 10, 3, "/0 = 0", 9); for ($i = 0; $i < 10; $i++) { $v['num'] = $i; $pdf->band_line($band, $v); }
band_height(), band_add_label(), band_add_box(), band_place(), band_line(), band_new()
This function was removed from the library in version 2. Use the new template functions instead.
The passing of the font and height parameters is inconsistent with the rest of the library and needs corrected.