Пример #1
0
$pdf->ezTable($data, $cols);
$pdf->ezText("\nDisabled showLines = 0\n", 10);
$pdf->ezTable($data, $cols, '', array('showHeadings' => 0, 'shaded' => 0, 'showLines' => 0));
$pdf->ezText("\nHorizontal lines (per row) - showLines = 3\n");
$pdf->ezTable($data, $cols, '', array('showHeadings' => 1, 'shaded' => 0, 'showLines' => 3));
$pdf->ezText("\nHeader line only - showLines = 4\n");
$pdf->ezTable($data, array('type' => 'Type', 'name' => '<i>Alias</i>'), '', array('showHeadings' => 1, 'shaded' => 0, 'showLines' => 4));
// get all user defined constants starting with 'EZ_GRIDLINE'
$all_constants = get_defined_constants();
$userConstants = array();
foreach ($all_constants as $k => $v) {
    if (substr($k, 0, 11) == "EZ_GRIDLINE") {
        $userConstants[$k] = $v;
    }
}
$pdf->ezNewPage();
// title for advanced grid line output
$pdf->ezText("\n<b>GRIDLINE options</b>", 12);
$pdf->ezText("<b>using 'gridline' option - available in version >= 0.12-rc11</b>", 10);
$j = 0;
for ($i = EZ_GRIDLINE_ALL; $i >= 0; $i--) {
    if (!($j % 5) && $j != 0) {
        $pdf->ezNewPage();
    }
    $constName = "";
    if ($m = array_search($i, $userConstants)) {
        $constName = $m;
    }
    $title = sprintf('Bitmask: %05b | Integer: %d %s', $i, $i, $constName);
    $pdf->ezText("\n" . $title . "\n");
    $pdf->ezTable($data, $cols, '', array('showHeadings' => 1, 'shaded' => 1, 'gridlines' => $i, 'cols' => $coloptions, 'innerLineThickness' => 0.5, 'outerLineThickness' => 3));