public function output($name = '', $dest = '') { foreach ($this->_documents as $document) { $pageCount = $this->setSourceFile($document); for ($i = 1; $i <= $pageCount; $i++) { $tplidx = $this->ImportPage($i); $this->AddPage(); $this->useTemplate($tplidx); } } foreach ($this->_tmpDocuments as $document) { unlink($document); } parent::Output($name, $dest); }
$pdf->Cell(13, 6, $ein[0], $border, 0, 'R'); $pdf->setXY(29, 236); $pdf->Cell(40, 6, $ein[1], $border, 0, 'L'); } $pdf->setXY(82, 244); $pdf->Cell(75, 6, $current_company->getName(), $border, 0, 'L'); $pdf->setXY(82, 253); $pdf->Cell(45, 6, $current_company->getAddress1() . ' ' . $current_company->getAddress2(), $border, 0, 'L'); $pdf->setXY(82, 261); $pdf->Cell(45, 6, $current_company->getCity() . ', ' . $current_company->getProvince() . ' ' . $current_company->getPostalCode(), $border, 0, 'L'); $pdf->setXY(157, 234); $pdf->Cell(35, 6, Misc::getBeforeDecimal(Misc::MoneyFormat($lines_arr['total']['p1_6'], FALSE)), $border, 0, 'R'); $pdf->setXY(193, 234); $pdf->Cell(6, 6, Misc::getAfterDecimal(Misc::MoneyFormat($lines_arr['total']['p1_6'], FALSE)), $border, 0, 'L'); } $output = $pdf->Output('', 'S'); if (Debug::getVerbosity() == 11) { Debug::Display(); } else { Misc::FileDownloadHeader('f940ez.pdf', 'application/pdf', strlen($output)); echo $output; } exit; } } break; case 'delete': case 'save': Debug::Text('Action: ' . $action, __FILE__, __LINE__, __METHOD__, 10); $generic_data['id'] = UserGenericDataFactory::reportFormDataHandler($action, $filter_data, $generic_data, URLBuilder::getURL(NULL, $_SERVER['SCRIPT_NAME'])); unset($generic_data['name']);
<?php error_reporting(E_ALL); define('FPDF_FONTPATH', 'font/'); require 'fpdi.php'; $pdf = new fpdi(); $pagecount = $pdf->setSourceFile("pdfdoc.pdf"); $tplidx = $pdf->ImportPage(1); $pdf->addPage(); $pdf->useTemplate($tplidx, 10, 10, 90); $pdf->Output("newpdf.pdf", "F"); $pdf->closeParsers();
$y = $pdf->GetY(); $group = $item_group; } $pdf->SetLineWidth(0.3); $pdf->Cell(0, 5, '', T, 1, L, 0); $pdf->SetFont($format_font, '', 8); $pdf->Cell(0, 5, 'Key:', 0, 1); $pdf->SetLineWidth(1.5); $pdf->SetDrawColor(255, 255, 255); $pdf->SetFont($format_font, '', 7); $pdf->SetFillColor(245, 190, 72); $pdf->Cell(5, 5, '', 1, 0, L, true); $pdf->Cell(25, 5, 'To be confirmed', 0, 0); $pdf->SetFillColor(245, 72, 72); $pdf->Cell(5, 5, '', 1, 0, L, true); $pdf->Cell(25, 5, 'Not yet completed', 0, 0); $pdf->SetFillColor(173, 233, 28); $pdf->Cell(5, 5, '', 1, 0, L, true); $pdf->Cell(25, 5, 'Complete', 0, 0); $pdf->SetFillColor(220, 220, 220); $pdf->Cell(5, 5, '', 1, 0, L, true); $pdf->Cell(25, 5, 'Not required', 0, 1); // If development code = "yes" (devcode = "yes") in the $_GET request, include some additional data if ($_GET[devcode] == "yes") { $pdf->MultiCell(0, 4, $sql_drawings); } // and send to output $file_date = time(); $file_name = $proj_num . "_2.05_" . Date("Y", $file_date) . "-" . Date("m", $file_date) . "-" . Date("d", $file_date) . "_Project_Checklist.pdf"; $pdf->Output($file_name, I);
$contact_proj_note = $array_contacts['contact_proj_note']; $contact = $contact_namefirst . " " . $contact_namesecond . "\n"; $contact = $contact . AddLine($contact_title); if ($contact_company > 0) { $contact = $contact . AddLine($company_name); $contact = $contact . AddLine($company_address); $contact = $contact . AddLine($company_city); $contact = $contact . AddLine($company_county); $contact = $contact . AddLine($company_postcode); $company_phone_print = "T. " . $company_phone; $contact = $contact . AddLine($company_phone_print); } else { $contact = $contact . AddLine($contact_address); $contact = $contact . AddLine($contact_city); $contact = $contact . AddLine($contact_county); $contact = $contact . AddLine($contact_postcode); $contact_phone_print = "T. " . $contact_phone; $contact = $contact . AddLine($contact_phone_print); } $contact_mobile_print = "M. " . $contact_mobile; $contact = $contact . AddLine($contact_mobile_print); $contact_email_print = "E. " . $contact_email; $contact = $contact . AddLine($contact_email_print); $contact_web_print = "W. " . $company_web; $contact = $contact . AddLine($contact_web_print); StyleHeading($discipline_name, $contact, $contact_proj_note); $count++; } // and send to output $pdf->Output();