Пример #1
0
     $lines_arr['total'] = Misc::ArrayAssocSum($lines_arr, NULL, 6);
     Debug::Arr($lines_arr, 'Lines Array: ', __FILE__, __LINE__, __METHOD__, 10);
     //Line 8
     $p1_line8 = $lines_arr['total']['p1_6'] - 0;
 }
 $border = 0;
 $pdf = new fpdi();
 //Import original Gov't supplied PDF.
 if ($show_background == TRUE) {
     $pagecount = $pdf->setSourceFile(Environment::getBasePath() . 'interface' . DIRECTORY_SEPARATOR . 'forms' . DIRECTORY_SEPARATOR . 'us' . DIRECTORY_SEPARATOR . 'tax' . DIRECTORY_SEPARATOR . 'f940ez.pdf');
     $tplidx = $pdf->ImportPage(1);
 }
 $pdf->setMargins(0, 0, 0, 0);
 $pdf->SetAutoPageBreak(FALSE);
 $pdf->SetFont('freeserif', '', 10);
 $pdf->AddPage();
 if (isset($tplidx)) {
     $pdf->useTemplate($tplidx, 0, 0);
 }
 $pdf->setXY(40, 39);
 $pdf->Cell(75, 6, $current_company->getName(), $border, 0, 'L');
 $pdf->setXY(157, 39);
 $pdf->Cell(10, 6, $filter_data['year'], $border, 0, 'R');
 $pdf->setXY(122, 47);
 $pdf->Cell(45, 6, $current_company->getBusinessNumber(), $border, 0, 'R');
 $pdf->setXY(40, 56);
 $pdf->Cell(75, 6, $current_company->getAddress1() . ' ' . $current_company->getAddress2(), $border, 0, 'L');
 $pdf->setXY(122, 56);
 $pdf->Cell(45, 6, $current_company->getCity() . ', ' . $current_company->getProvince() . ' ' . $current_company->getPostalCode(), $border, 0, 'R');
 if (isset($lines_arr)) {
     //Line A