示例#1
0
                                array('lun' => 51,'nam'=>'Note')
                            )
              );
$pdf = new Report_template();
$pdf->setVars($admin_aziend,$title);
$pdf->SetTopMargin(39);
$pdf->SetFooterMargin(22);
$config = new Config;
$pdf->SetFont('helvetica','',7);
$pdf->AddPage('P',$config->getValue('page_format'));
$pdf->SetFillColor(hexdec(substr($admin_aziend['colore'],0,2)),hexdec(substr($admin_aziend['colore'],2,2)),hexdec(substr($admin_aziend['colore'],4,2)));
$ctrl_mas = 0;
$max_y = 0;
while ($row = gaz_dbi_fetch_array($result)) {
    $mas=intval(substr($row['codice'],0,3));
    $y=$pdf->GetY();
    if ($y<250){
        $max_str=intval(13*(254-$y));
        if ($ctrl_mas<$mas ){  // mastri
            if (intval(substr($row['codice'],3,6))==0) {
               $cm_d=trim($row['ceedar']);
               $cm_a=trim($row['ceeave']);
            }
            if (isset($note[1])){ // ma se ho una nota del mastro precedente la devo stampare
                $pdf->AddPage('P',$config->getValue('page_format'));
                $pdf->Cell(135);
                $pdf->SetFont('helvetica','',7);
                $pdf->MultiCell(51,4,$note[1],1,'L',true);
                $y=$pdf->GetY();
                $max_str=intval(13*(254-$y));
            }