band_line -- Automatically place a band on a page
int band_line ( int band, array data )
This function paints the band specified by band
.
immediately below the last band placed.
When the band is placed, values in the data
array are substituted for any fields with matching names.
The first time this function is called, a new page (of size "letter") is created and the band is placed 1/2" from the top of the page. With each subseqent band placement the band is placed immediately below the previous band. New pages are created as needed.
1/2" margins are maintained durning all placements.
The function returns the page ID that the band was placed on.
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_add_field(), band_new()
This function was removed from the library in version 2. Use the new template functions instead.
This function is too automatic, and its usefulness is limited by this. There should be some mechanism to manually adjust the starting position of the first band, and configure margins and page sizes.