本文整理汇总了PHP中FPDI::MultiCell方法的典型用法代码示例。如果您正苦于以下问题:PHP FPDI::MultiCell方法的具体用法?PHP FPDI::MultiCell怎么用?PHP FPDI::MultiCell使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类FPDI
的用法示例。
在下文中一共展示了FPDI::MultiCell方法的14个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generate_philosophy_certificate
function generate_philosophy_certificate($confirmation, $form, $entry, $ajax)
{
// print_r( $entry ); die;
if ($entry['gquiz_is_pass']) {
$upload_dir = wp_upload_dir();
// initiate FPDI
$pdf = new FPDI();
// set the sourcefile
$pdf->setSourceFile(get_template_directory() . '/library/certificate.pdf');
// import page 1
$tplIdx = $pdf->importPage(1);
// get the width and height of the template
$specs = $pdf->getTemplateSize($tplIdx);
// add a page
$pdf->AddPage("L", array($specs['w'], $specs['h']));
// use the imported page as the template
$pdf->useTemplate($tplIdx, 0, 0);
// now write some text above the imported page
$pdf->SetY(101);
$pdf->SetFont("dejavuserifbi", 'I', 35);
$pdf->SetTextColor(0, 54, 99);
$text = $entry['2.3'] . " " . $entry['2.6'];
$pdf->MultiCell(260, 40, $text, 0, 'C');
// now write some text above the imported page
$pdf->SetY(165);
$pdf->SetFont("dejavuserifbi", 'I', 22);
$pdf->SetTextColor(0, 54, 99);
$text = date('F j, Y');
$pdf->MultiCell(260, 22, $text, 0, 'C');
// save the pdf out to file
$pdf->Output($upload_dir['basedir'] . '/certificates/' . $entry['id'] . '.pdf', 'F');
}
return array('redirect' => '/philosophy-results/?id=' . $entry['id']);
}
示例2: MultiCell
function MultiCell($w, $h, $txt, $border = 0, $align = 'L', $fill = 0, $ln = 2)
{
if ($this->CurrentFont['type'] == 'Type0') {
$this->SJISMultiCell($w, $h, $txt, $border, $align, $fill, $ln);
} else {
parent::MultiCell($w, $h, $txt, $border, $align, $fill, $ln);
}
}
示例3: chdir
if ($fax_caller_id_number != '') {
$pdf->Write(0.3, format_phone($fax_caller_id_number));
}
}
if ($fax_page_count > 0) {
$pdf->Text($x + 2.0, $y + 2.6, $fax_page_count . ' ' . $text['label-fax-page' . ($fax_page_count > 1 ? 's' : null)]);
}
if ($fax_subject != '') {
$pdf->Text($x + 2.0, $y + 2.9, $fax_subject);
}
//message
$pdf->Rect($x + 0.5, $y + 3.4, 7.5, 6.25, 'D');
if ($fax_message != '') {
$pdf->SetFont($pdf_font, "", 12);
$pdf->SetXY($x + 0.75, $y + 3.65);
$pdf->MultiCell(7, 5.75, $fax_message, 0, 'L', false);
}
//footer
if ($fax_footer != '') {
$pdf->SetFont("helvetica", "", 8);
$pdf->SetXY($x + 0.5, $y + 9.9);
$pdf->MultiCell(7.5, 0.75, $fax_footer, 0, 'C', false);
}
// save cover pdf
$pdf->Output($dir_fax_temp . '/' . $fax_instance_uuid . '_cover.pdf', "F");
// Display [I]nline, Save to [F]ile, [D]ownload
//convert pdf to tif, add to array of pages, delete pdf
if (file_exists($dir_fax_temp . '/' . $fax_instance_uuid . '_cover.pdf')) {
chdir($dir_fax_temp);
$cmd = gs_cmd("-q -sDEVICE=tiffg3 -r" . $gs_r . " -g" . $gs_g . " -dNOPAUSE -sOutputFile=" . correct_path($fax_instance_uuid) . "_cover.tif -- " . correct_path($fax_instance_uuid) . "_cover.pdf -c quit");
// echo($cmd . "<br/>\n");
示例4: createScreeningPdf
public function createScreeningPdf($hash)
{
$screening_entry_model = ScreeningEntry::findOne(['hash' => $hash]);
$screening_form_model = ScreeningForm::findOne(['id' => $screening_entry_model->screening_form_id]);
$subject_model = Subject::findOne(['id' => $screening_entry_model->subject_id]);
$count = 1;
//$permissions = \SetaPDF_Core_SecHandler::PERM_DIGITAL_PRINT ;
$this->_font = 'Helvetica';
//class_exists('TCPDF', true); // trigger Composers autoloader to load the TCPDF class
$pdf = new \FPDI();
$pdf->SetAutoPageBreak(true);
// add a page
$pdf->SetTopMargin(30);
$pdf->AddPage();
$pdf->setSourceFile(\yii::$app->basePath . "/../letterhead-mini-header.pdf");
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 0, 0);
$pdf->SetFont($this->_font, '', 9);
$pdf->SetXY(10, 6);
$pdf->Cell(0, 3, 'Confidential - Participant screening form');
$pdf->SetFont($this->_font, '', 12);
$pdf->SetXY(10, 14);
$pdf->MultiCell(150, 3, yii::$app->DateComponent->timestampToUkDate($screening_entry_model->created_at), 0, 'R');
$pdf->MultiCell(100, 3, $screening_entry_model->screening_form_title, 0, '');
$pdf->Ln();
$pdf->SetFont($this->_font, '', 9);
$pdf->Cell(100, 4, sprintf('Participant: %s %s (dob %s)', $screening_entry_model->subject->first_name, $screening_entry_model->subject->last_name, yii::$app->DateComponent->isoToUkDate($screening_entry_model->subject->dob)));
$pdf->Cell(50, 4, sprintf('Identifier: %s', $screening_entry_model->subject->cubric_id), 0, '', 'R');
$pdf->Ln();
$pdf->Cell(100, 4, sprintf('Researcher: %s %s (project %s)', $screening_entry_model->researcher->first_name, $screening_entry_model->researcher->last_name, $screening_entry_model->project->code));
$pdf->Cell(50, 4, sprintf('Resource: %s', $screening_entry_model->resource_title), 0, '', 'R');
$pdf->SetXY(10, 38);
$pdf->SetFont($this->_font, '', 12);
$pdf->Cell(150, 4, sprintf('Responses'));
$pdf->SetFont($this->_font, '', 9);
$pdf->Ln();
foreach (yii::$app->screeningresponse->getResponses($hash) as $response) {
if (strlen($response['caption']) > 0) {
$pdf->Ln();
$pdf->MultiCell(180, 4, sprintf('%s ', $response['caption']), 0, 'U');
$count = 1;
}
$pdf->MultiCell(180, 4, sprintf('%s. %s ', $count, $response['content']));
$pdf->SetFont($this->_font, 'B', 9);
if ($response['response'] === null) {
$response['response'] = 'Not specified / Unknown.';
}
$pdf->MultiCell(180, 4, sprintf('%s ', $response['response']));
$pdf->SetFont($this->_font, '', 9);
$count++;
$pdf->Ln();
}
$pdf->Ln();
$pdf->SetFont($this->_font, '', 12);
$pdf->Cell(180, 4, sprintf('Signatures'));
$pdf->Ln();
$pdf->Ln();
$pdf->SetFont($this->_font, '', 9);
$pdf->Cell(100, 4, 'Participant ');
$pdf->Cell(100, 4, 'Researcher ');
$pdf->Ln();
$pdf->Ln();
$currentX = $pdf->GetX();
$currentY = $pdf->GetY();
$pdf->Image(sprintf('/tmp/subject-%s.png', $hash), $currentX, $currentY);
$currentX = $pdf->GetX();
$pdf->Image(sprintf('/tmp/researcher-%s.png', $hash), $currentX + 100, $currentY);
// now write some text above the imported page
// NOW SET ScreeningEntry::progress_id = PUBLISHED so it cannot be edited again.
// $pdfData = $pdf->Output('S');
// create a writer
// create a Http writer
//$writer = new \SetaPDF_Core_Writer_Http("fpdf-sign-demo.pdf", true);
// load document by filename
//$document = new \SetaPDF_Core_Document::loadByString($pdfData, $writer);
//$document = new \SetaPDF_Core_Reader_File($pdf->Output(), $writer);
$writer = new \SetaPDF_Core_Writer_File("/Users/Spiro/tmp/myPDF.pdf");
$document = \SetaPDF_Core_Document::loadByString($pdf->Output("S"), $writer);
// let's prepare the temporary file writer:
\SetaPDF_Core_Writer_TempFile::setTempDir("/tmp/");
// create a signer instance for the document
$signer = new \SetaPDF_Signer($document);
// add a field with the name "Signature" to the top left of page 1
$signer->addSignatureField(\SetaPDF_Signer_SignatureField::DEFAULT_FIELD_NAME, 1, \SetaPDF_Signer_SignatureField::POSITION_LEFT_BOTTOM, array('x' => 10, 'y' => 10), 180, 50);
// set some signature properties
$signer->setReason('Integrity');
$signer->setLocation('CUBRIC');
$signer->setContactInfo('+44 2920 703859');
// ccreate an OpenSSL module instance
$module = new \SetaPDF_Signer_Signature_Module_OpenSsl();
// set the sign certificate
$module->setCertificate(file_get_contents("/Users/spiro/Sites/projects/certs/certificate.pem"));
// set the private key for the sign certificate
$module->setPrivateKey(array(file_get_contents("/Users/spiro/Sites/projects/certs/key.pem"), ""));
// create a Signature appearance
$visibleAppearance = new \SetaPDF_Signer_Signature_Appearance_Dynamic($module);
// choose a document to get the background from and convert the art box to an xObject
$backgroundDocument = \SetaPDF_Core_Document::loadByFilename(Yii::getAlias('@frontend/web/img/cubric-logo.pdf'));
$backgroundXObject = $backgroundDocument->getCatalog()->getPages()->getPage(1)->toXObject($document);
//.........这里部分代码省略.........
示例5: array
function ten_tardiness_second($second_offenders = array())
{
$this->load->library('fpdf');
define('FPDF_FONTPATH', $this->config->item('fonts_path'));
$this->load->library('fpdi');
// initiate FPDI
$pdf = new FPDI('P', 'mm', 'Legal');
$pdf->SetLeftMargin(20);
$pdf->SetRightMargin(15);
// add a page
$pdf->AddPage();
// set the sourcefile
$pdf->setSourceFile('dtr/template/notice2nd.pdf');
// select the first page
$tplIdx = $pdf->importPage(1);
// use the page we imported
$pdf->useTemplate($tplIdx);
$offices = Input::get('offices');
$office_id = $offices[0];
$m1 = 'Jul';
$m2 = 'Aug';
$m3 = 'Sep';
$m4 = 'Oct';
$m5 = 'Nov';
$m6 = 'Dec';
$mo1 = '07';
$mo2 = '08';
$mo3 = '09';
$mo4 = '10';
$mo5 = '11';
$mo6 = '12';
$pdf->SetFont('Arial', '', '12');
$pdf->SetXY(155, 50);
$pdf->Write(0, date('F d, Y'));
$pdf->SetX(35);
$pdf->SetFont('Arial', 'B', '');
$pdf->Cell(0, 6, "HON. EDWARD S. HAGEDORN ", '', 1, 'L', FALSE);
$pdf->SetFont('Arial', '', '');
$pdf->SetX(35);
$pdf->Cell(0, 6, "City Mayor", '', 1, 'L', FALSE);
$pdf->SetX(35);
$pdf->Cell(0, 6, "Puerto Princesa City", '', 1, 'L', FALSE);
$pdf->Cell(0, 6, "", '', 1, 'C', FALSE);
$pdf->Cell(0, 6, "Thru: ATTY. SHIRLEY R. DAGANTA", '', 1, 'C', FALSE);
$pdf->Cell(0, 6, "CG Assistant Dept. Head II", '', 1, 'C', FALSE);
$pdf->Cell(0, 6, "Assistant City Legal Officer II", '', 1, 'C', FALSE);
$pdf->Ln(12);
$pdf->SetX(35);
$pdf->SetFont('Arial', 'B', '');
$pdf->Write(0, 'Madam:');
$pdf->SetFont('Arial', '', '');
$pdf->Ln(6);
$pdf->SetX(35);
$pdf->MultiCell(0, 6, " Please be informed that despite the first notice issued to him/her as per records in this office, it has been observed that the he/she has continuously incurred the following tardiness and undertime, viz:", 0, 'L', false);
//$pdf->SetX(35);
//$pdf->Cell(0,6," $number of your employees has incurred the following, viz:",'',0,'L',false);
$pdf->SetFont('Arial', 'BI', 10);
$pdf->Ln(2);
$pdf->SetFillColor(210, 210, 210);
//$pdf->SetX(20);
//header
$pdf->Cell(50, 8, "Name", 'RLTB', 0, 'C', 1);
$pdf->Cell(20, 4, $m1, '1', 0, 'C', 1);
$pdf->Cell(20, 4, $m2, '1', 0, 'C', 1);
$pdf->Cell(20, 4, $m3, '1', 0, 'C', 1);
$pdf->Cell(20, 4, $m4, '1', 0, 'C', 1);
$pdf->Cell(20, 4, $m5, '1', 0, 'C', 1);
$pdf->Cell(20, 4, $m6, '1', 1, 'C', 1);
$pdf->SetFont('Arial', '', 9);
$pdf->SetFillColor(240, 240, 240);
$pdf->Cell(50, 4, "", 'RLB', 0, 'C', false);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "Tardy", '1', 0, 'C', 1);
$pdf->Cell(10, 4, "UT", '1', 1, 'C', 1);
$pdf->SetFillColor(215, 255, 215);
$year1 = Input::get('year');
$tardis = $second_offenders;
if (is_array($tardis)) {
foreach ($tardis as $tardi) {
$name = $this->Employee->get_employee_info($tardi, $field = '');
$late1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 1, 3);
$late2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 1, 3);
$late3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 1, 3);
$late4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 1, 3);
$late5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 1, 3);
$late6 = $this->Tardiness->count_late($name['employee_id'], $mo6, $year1, 1, 3);
$under_time1 = $this->Tardiness->count_late($name['employee_id'], $mo1, $year1, 2, 4);
$under_time2 = $this->Tardiness->count_late($name['employee_id'], $mo2, $year1, 2, 4);
$under_time3 = $this->Tardiness->count_late($name['employee_id'], $mo3, $year1, 2, 4);
$under_time4 = $this->Tardiness->count_late($name['employee_id'], $mo4, $year1, 2, 4);
$under_time5 = $this->Tardiness->count_late($name['employee_id'], $mo5, $year1, 2, 4);
//.........这里部分代码省略.........
示例6: define
function leave_apps_quezon($leave_apps_id = '')
{
$rows = $this->Leave_apps->get_leave_apps_info($leave_apps_id);
$name = $this->Employee->get_employee_info($rows['employee_id']);
$office_name = $this->Office->get_office_name($name['office_id']);
$this->load->library('fpdf');
define('FPDF_FONTPATH', $this->config->item('fonts_path'));
$this->load->library('fpdi');
// initiate FPDI
$pdf = new FPDI('P', 'mm', 'A4');
// add a page
$pdf->AddPage();
// set the sourcefile
$pdf->setSourceFile('dtr/template/APPLICATION_FOR_LEAVE_QUEZON.pdf');
// select the first page
$tplIdx = $pdf->importPage(1);
// use the page we imported
$pdf->useTemplate($tplIdx);
// set font, font style, font size.
$pdf->SetFont('Arial', 'B', 12);
// set initial placement
$pdf->SetXY(158, 10.5);
// line break
//$pdf->Ln(40);
$pdf->Write(0, 'Tracking no: ' . $leave_apps_id);
$pdf->Ln(9);
$pdf->SetX(158);
//ID number
$pdf->Write(0, ' ' . $rows['employee_id']);
$pdf->Ln(14);
// go to 25 X (indent)
$pdf->SetX(25);
$this->Office->fields = array('office_code', 'office_head', 'position');
$office = $this->Office->get_office_info($name['office_id']);
// write office
//$pdf->Write(0, $office['office_code']);
//$pdf->Write(0, $office_name);
//$pdf->SetXY(158,10.5);
$pdf->SetFont('Arial', '', 7);
$pdf->MultiCell(60, 5, $office_name);
$pdf->SetFont('Arial', 'B', 12);
$pdf->SetXY(90, 40);
//lname
$pdf->SetX(90);
$pdf->Write(0, utf8_decode($name['lname']));
//fname
$pdf->SetX(145);
$pdf->Write(0, utf8_decode($name['fname']));
$extension = '';
if ($name['extension'] != '') {
$extension = $name['extension'] . ' ';
$pdf->SetX(186);
} else {
$pdf->SetX(192);
}
//mname
$pdf->Write(0, utf8_decode($extension . $name['mname'][0] . '.'));
$pdf->Ln(13);
//date of file
$pdf->SetX(25);
$pdf->Write(0, date("F d, Y", strtotime($rows['date_encode'])));
$pdf->SetFont('Arial', '', 9);
//position
$pdf->SetX(70);
$pdf->Write(0, $name['position']);
$pdf->SetFont('Arial', 'B', 12);
// We need to check what salary grade the office use
if ($office['salary_grade_type'] == 'hospital') {
$this->Salary_grade->salary_grade_type = 'hospital';
}
//monthly salary
$pdf->SetX(170);
$pdf->Write(0, 'P ' . number_format($this->Salary_grade->get_monthly_salary($name['salary_grade'], $name['step']), 2));
$pdf->Ln(14);
$leave_name = $this->Leave_type->get_leave_name($rows['leave_type_id']);
$leave_type_ids = array(1, 3, 4, 5, 6, 7, 9, 10, 12);
if (in_array($rows['leave_type_id'], $leave_type_ids)) {
$pdf->Ln(2);
$pdf->SetX(28);
$pdf->Write(0, 'X');
$pdf->Ln(15);
$pdf->SetX(34);
if ($rows['leave_type_id'] == 1) {
$leave_name = '';
}
$pdf->SetFont('Arial', 'B', 10);
$pdf->Write(0, $leave_name);
$pdf->SetFont('Arial', 'B', 12);
}
$leave_type_ids = array(2, 11, 20);
if (in_array($rows['leave_type_id'], $leave_type_ids)) {
$pdf->Ln(27);
$pdf->SetX(28);
$pdf->Write(0, 'X');
$pdf->Ln(18);
$pdf->SetX(32);
if ($rows['leave_type_id'] == 2) {
$leave_name = '';
}
$pdf->SetFont('Arial', 'B', 10);
//.........这里部分代码省略.........
示例7: date
$pdf->Text($report[x], $report[y], $firma["zipcode"] . " " . utf8_decode($firma["city"]));
$pdf->Text($repphone[x], $repphone[y], $firma["phone"]);
$pdf->Text($repaid[x], $repaid[y], $_GET["aid"]);
$pdf->SetFont($repfont, '', $repsizeN);
$pdf->Text($repwvnr[x], $repwvnr[y], $masch['contractnumber']);
$pdf->Text($repkdnr[x], $repkdnr[y], $firma["customernumber"]);
$pdf->Text($repdate[x], $repdate[y], date("d.m.Y"));
$pdf->Text($repmasch[x], $repmasch[y], utf8_decode($masch["description"]));
$pdf->Text($repser[x], $repser[y], $masch["serialnumber"]);
$pdf->Text($repsort[x], $repsort[y], utf8_decode($masch["standort"]));
$pdf->Text($repcnt[x], $repcnt[y], $masch["counter"]);
$pdf->Text($repinsp[x], $repinsp[y], db2date($masch["inspdatum"]));
$pdf->Text($repkurz[x], $repkurz[y], utf8_decode($rep["cause"]));
$pdf->SetY($replang[x]);
$pdf->SetX($replang[y]);
$pdf->MultiCell(0, 6, utf8_decode($rep["schaden"]), 0);
$pdf->addPage();
$history = "Die letzten Ereignisse:\n";
$history .= db2date($hist[0]["datum"]);
$history .= " " . $hist[0]["art"] . " ";
if ($hist[0]["art"] == "RepAuftr") {
preg_match("/^[0-9]+\\|(.+)/", utf8_decode($hist[0]["beschreibung"]), $treffer);
$history .= $treffer[1] . "\n";
} else {
$history .= $hist[0]["beschreibung"] . "\n";
}
$history .= db2date($hist[1]["datum"]);
$history .= " " . $hist[1]["art"] . " ";
if ($hist[1]["art"] == "RepAuftr") {
preg_match("/^[0-9]+\\|(.+)/", utf8_decode($hist[1]["beschreibung"]), $treffer);
$history .= $treffer[1] . "\n";
示例8: write_instruction
//.........这里部分代码省略.........
$pdf->SetXY(5.3, 166.5);
$pdf->Cell(0, 0, $ing3);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 171.5);
$pdf->Cell(0, 0, $ing4);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 176.5);
$pdf->Cell(0, 0, $ing5);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 181.5);
$pdf->Cell(0, 0, $ing6);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 186.5);
$pdf->Cell(0, 0, $ing7);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 191.5);
$pdf->Cell(0, 0, $ing8);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 196.5);
$pdf->Cell(0, 0, $ing9);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 201.5);
$pdf->Cell(0, 0, $ing10);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 206.5);
$pdf->Cell(0, 0, $ing11);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 211.5);
$pdf->Cell(0, 0, $ing12);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 216.5);
$pdf->Cell(0, 0, $ing13);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 221.5);
$pdf->Cell(0, 0, $ing14);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 226.5);
$pdf->Cell(0, 0, $ing15);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 231.5);
$pdf->Cell(0, 0, $ing16);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 236.5);
$pdf->Cell(0, 0, $ing17);
$pdf->SetFont('Roboto', 'B', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(5.3, 241.5);
$pdf->Cell(0, 0, $ing18);
// Write Dynamic Data - Hop Schedule
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 171);
$pdf->Cell(0, 0, $hop1);
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 174.2);
$pdf->Cell(0, 0, $hop2);
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 177.4);
$pdf->Cell(0, 0, $hop3);
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 180.6);
$pdf->Cell(0, 0, $hop4);
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 183.8);
$pdf->Cell(0, 0, $hop5);
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(0, 0, 0);
$pdf->SetXY(114, 187);
$pdf->Cell(0, 0, $hop6);
// Create page 2 & Read Template Page 2
$pdf->AddPage('P', 'Letter');
$tmp = $pdf->importPage(2);
$pdf->useTemplate($tmp, 0, 0);
// Write Dynamic Data - Special Instructions
$pdf->SetFont('Roboto', '', 7.5);
$pdf->SetTextColor(255, 255, 255);
$pdf->SetXY(11, 13);
$pdf->MultiCell(165, 3, utf8_decode($sp_inst));
$shortname = str_replace(' ', '', $recipe);
$filename = "C:/Users/tyler/Google Drive/MonsterBrew/Product/Recipe Kits/Instructions/Instructions - Extract/EX_INS_" . $shortname . ".pdf";
$pdf->Output($filename, 'F');
}
示例9: generatesExternalReport
public function generatesExternalReport($id = -1)
{
/*
* Loading libraries and helpers
*/
$this->load->library(array('rb', 'fpdf_gen'));
$this->load->helper(array('date', 'utility'));
/*
* The request id is not set
*/
if ($id == -1) {
echo "Parece que não foi especificado qual o id da Solicitação.";
exit;
}
/*
* Loading request
*/
$request = R::findOne('request', 'id=?', array($id));
/*
* Request exists
*/
if ($request == null) {
echo 'Parece que a solicitação não existe.';
exit;
}
/*
* Creating PDF
*/
$pdf = new FPDI();
$pdf->addPage('L');
/* *********************************************************
* BEGIN - HEADER
********************************************************* */
$pdf->image(public_url('img/' . $this->config->item('system_report_logo')), 140, 5);
$pdf->ln(14);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(0, 0, utf8_decode($this->config->item('system_name')), 0, 0, 'C');
$pdf->Ln(5);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(0, 0, utf8_decode("SOLICITAÇÃO DE INFORMAÇÃO"), 0, 0, 'C');
/* *********************************************************
* END - HEADER
********************************************************* */
$pdf->Ln(10);
$pdf->SetFont('Courier', 'B', 9);
$pdf->SetDrawColor(217, 217, 217);
$pdf->SetFillColor(217, 217, 217);
$pdf->Cell(0, 10, utf8_decode(' DADOS DA SOLICITAÇÃO'), 'LRTB', 0, 'L', true);
$pdf->Ln(10);
$pdf->Cell(24, 10, utf8_decode(' PROTOCOLO: '), 'LTB', 0, 'L', false);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(110, 10, utf8_decode($request->protocol), 'TBR', 0, 'L', false);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(32, 10, utf8_decode(' SOLICITADA EM: '), 'TB', 0, 'L', false);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(111, 10, utf8_decode(mdate('%d/%m/%Y', strtotime($request->createdAt))), 'TBR', 0, 'L', false);
$pdf->Ln(10);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(24, 10, utf8_decode(' SITUAÇÃO: '), 'LB', 0, 'L', false);
$pdf->SetFont('Courier', '', 9);
$pdf->Cell(253, 10, utf8_decode(status_text($request->status)), 'TBR', 0, 'L', false);
$pdf->Ln(10);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(0, 10, utf8_decode(' SOLICITAÇÃO: '), 'LR', 0, 'L', false);
$pdf->Ln(8);
$pdf->SetFont('Courier', '', 9);
$pdf->MultiCell(0, 5, utf8_decode(' ' . $request->request), 'LR', 'L', false);
$pdf->Cell(0, 4, '', 'LR', 0, 'L', false);
$pdf->Ln(4);
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(0, 10, utf8_decode(' TRÂMITAÇÃO'), 'LRTB', 0, 'L', true);
$pdf->Ln(10);
$pdf->SetFont('Courier', '', 9);
$statuses = R::find('status', ' request_id = ? ORDER BY created_at ASC ', array($request->id));
if (!count($statuses)) {
$pdf->Cell(0, 10, utf8_decode(' Nenhuma trâmitação ainda'), 'LRB', 0, 'L', false);
} else {
foreach ($statuses as $s) {
$pdf->SetFont('Courier', 'B', 9);
$pdf->Cell(0, 10, utf8_decode(' ' . status_text($s->type) . ' [' . date('d/m/Y', strtotime($s->createdAt)) . ']'), 'LR', 0, 'L', false);
$pdf->Ln(10);
$pdf->SetFont('Courier', '', 9);
$pdf->MultiCell(0, 5, utf8_decode(' ' . $s->response), 'LRB', 'L', false);
}
}
$pdf->Ln(10);
$pdf->Output();
}
示例10:
// add a page
$pdf->AddPage();
// set the source file
$pdf->setSourceFile("fpdi/timbre.pdf");
// import page 1
$tplIdx = $pdf->importPage(1);
// use the imported page and place it at point 10,10 with a width of 100 mm
$pdf->useTemplate($tplIdx, 0, 0, 210);
// now write some text above the imported page
$pdf->SetFont('Arial','B',14);
$pdf->Ln(60);
$pdf->Cell(85);
$pdf->Cell(20,10,'RECIBO');
$pdf->SetFont('Arial','',10);
$pdf->Ln(20);
$pdf->Cell(20);
$pdf->MultiCell(150,10,utf8_decode('Recebi de '.$nome.', CPF '.$cpf.', a importância de R$'.$valor.' ('.$valorex.') referente à consulta médica.'),0,J);
$pdf->SetY(250);
$pdf->Cell(45);
$pdf->Cell(20,10,'_____________________________________________________');
$pdf->Ln(5);
$pdf->Cell(65);
$pdf->Cell(20,10,'Dra. Clarissa de Oliveira Soares Peixoto');
$pdf->Ln(5);
$pdf->Cell(80);
$pdf->Cell(20,10,'CPF: 030.771.727-55');
$pdf->Output("recibo_".$nome.".pdf",D);
?>
示例11: FlyerRendering
//.........这里部分代码省略.........
// Output-Dasteiname zusammenbauen
$outputFile = $outputPostfix . "-" . $inputFile;
// initiate FPDI
$pdf = new FPDI();
echo "Input: {$inputFile}\n";
$pageCount = $pdf->setSourceFile($inputFile);
// Importiere Vorder- und Rueckseite
$Vorderseite = $pdf->ImportPage(1);
$Rueckseite = $pdf->ImportPage(2);
// Seitenabmessungen holen
$size = $pdf->getTemplateSize($Vorderseite);
$dokumentBreite = round($size['w'], 2);
$dokumentHoehe = round($size['h'], 2);
echo "Dokumenten Breite: {$dokumentBreite} mm\n";
echo "Dokumenten Hoehe: {$dokumentHoehe} mm\n";
echo "Anschnitt: {$anschnitt} mm\n";
// Vorderseite uebernehmen
// Anfang eines bloeden Hacks wegen des FooterZeilen-Textes.
// Der Footertext laesst sich nur einfügen, wenn die Seite eine A4 Seite ist.
// Keine Ahnung warum!
$pdf->AddPage('L');
$tplVorderseite = $pdf->importPage(1);
$pdf->useTemplate($tplVorderseite);
//Margin ist wegen der Rand-Platzierung des Community Names wichtig.
$pdf->SetMargins(0, 0, 0);
// erstmal alle Fonts laden
echo "Lade Fonts...\n";
$pdf->AddFont('lato-bold');
$pdf->AddFont('lato-regular');
$pdf->AddFont('alternategothic');
// Rendern Titel Text
echo "Verarbeite Titel Text...\n";
$pdf->SetFont('lato-bold');
$pdf->SetFontSize($kontaktTitelFontSize);
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktTitelPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $kontaktTitelText));
// Rendern Info Text
echo "Verarbeite Info Text...\n";
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetFontSize($kontaktInfoFontSize);
foreach ($kontaktInfoTexte as $a) {
$pdf->SetFont('lato-bold');
$pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[0]));
$pdf->SetFont('lato-regular');
$pdf->SetXY($kontaktInfoTextPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[1]));
$kontaktInfoPositionY = $kontaktInfoPositionY + $kontaktInfoZeilenOffsetY;
}
// Rendern Community Logo
echo "Verarbeite Logo...\n";
$pdf->Image($kontaktLogoDateiName, $kontaktLogoPositionX + $anschnitt, $kontaktLogoPositionY + $anschnitt, $kontaktLogoWidth, 0);
// Rendern Fusszeilen Text
echo "Verarbeite Fusszeile...\n";
$pdf->SetFont('lato-regular');
$pdf->SetFontSize($kontaktFooterFontSize);
$pdf->SetTextColor(255, 255, 255);
//weiss
$pdf->SetXY($kontaktFooterPositionX + $anschnitt, $kontaktFooterPositionY + $anschnitt);
$pdf->Cell($kontaktFooterWidth, 0, iconv('UTF-8', 'windows-1252', $kontaktFusszeileText), 0, 0, 'C');
// Rendern Community Name
echo "Verarbeite Community Name...\n";
$pdf->SetFont('alternategothic');
$pdf->SetFontSize($communityNameFontSize);
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetXY($communityNamePositionX + $anschnitt, $communityNamePositionY + $anschnitt);
$pdf->MultiCell($wRechts, 10, iconv('UTF-8', 'windows-1252', $communityNameText), 0, 'C');
// Das war's mit dem Editieren
// Original PDF Rueckseit uebernehmen
$pdf->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplRueckseite = $pdf->importPage(2);
$pdf->useTemplate($tplRueckseite);
// und erstmal abspeichern
echo "Zwischenspeichern...\n";
$pdf->Output($outputFile);
// Hier geht jetzt der Hack wegen der Footerzeile weiter
// Die gerade abgespeicherte Datei wird erneut eingelesen
// um dann im Seiten-Format der Ursprungsdatei erneut abgespeichert zu werden.
// Is' doof, muss aber sein
$pdf_2 = new FPDI();
echo "Erneut laden...\n";
$pageCount = $pdf_2->setSourceFile($outputFile);
echo "Feinschliff...\n";
$Vorderseite_2 = $pdf_2->ImportPage(1);
$Rueckseite_2 = $pdf_2->ImportPage(2);
$pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplForderseite = $pdf_2->importPage(1);
$pdf_2->useTemplate($tplForderseite);
$pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplRueckseite = $pdf_2->importPage(2);
$pdf_2->useTemplate($tplRueckseite);
echo "Output: {$outputFile}\n";
$pdf_2->Output($outputFile);
unset($pdf);
unset($pdf_2);
}
示例12: generatePDF
//.........这里部分代码省略.........
$pdf->SetFont('Arial', '', 9);
$pdf->SetXY(10, 27 + $logo_height);
$pdf->Cell(60, 4, $societe->ville . " " . utf8_decode(_("on")) . " " . strftime("%d/%m/%Y", $facture->timestamp_date_facture));
$pdf->SetXY(10, 32 + $logo_height);
if (!empty($societe->tva_intracommunautaire)) {
$pdf->Cell(60, 4, utf8_decode(_("VAT code")) . " " . $societe->raison_sociale . " : {$societe->tva_intracommunautaire}\n");
}
if (!empty($facture->vat_number)) {
$pdf->Write(5, utf8_decode(_("Your VAT code")) . " : {$facture->vat_number}\n");
}
$pdf->Write(5, $facture->ref_contrat . "\n");
$pdf->Write(5, wordwrap($facture->extra_top, 70));
// Lignes de facturation
$pdf->SetLineWidth(0.1);
$pdf->SetXY(10, 80);
$pdf->SetFont('Arial', 'B', '10');
$pdf->Cell(110, 6, utf8_decode(_("Designation")), 1);
$pdf->Cell(20, 6, utf8_decode(_("Quantity")), 1, 0, "C");
$pdf->Cell(30, 6, utf8_decode(_("VAT excl.")), 1, 0, "C");
$pdf->Cell(30, 6, utf8_decode(_("Total")), 1, 0, "C");
$pdf->Ln();
$total_ht = 0;
foreach ($facture->lignes as $ligne) {
foreach ($ligne as $n => $v) {
$ligne->{$n} = preg_replace("/€/", "EUROSYMBOL", $ligne->{$n});
$ligne->{$n} = utf8_decode($ligne->{$n});
$ligne->{$n} = preg_replace("/EUROSYMBOL/", chr(128), $ligne->{$n});
}
setlocale(LC_TIME, "fr_FR.UTF8");
// Replace dates like YYYY-MM-DD with nice expanded date
$ligne->description = preg_replace_callback('/\\d{4}-\\d{2}-\\d{2}/', create_function('$matches', 'return utf8_decode(strftime("%e %B %Y", strtotime($matches[0])));'), $ligne->description);
$y_start = $pdf->getY();
$pdf->SetFont('Arial', '', '10');
$pdf->MultiCell(110, 6, $ligne->description, "LR", 'L');
$x = $pdf->getX();
$y = $pdf->getY();
$pdf->setXY(120, $y_start);
$pdf->Cell(20, 6, $ligne->qtt, "LR", 0, "C");
$pdf->Cell(30, 6, preg_replace("/\\./", ",", sprintf("%.2f" . EURO, $ligne->prix_ht)), "LR", 0, "R");
$pdf->Cell(30, 6, preg_replace("/\\./", ",", sprintf("%.2f" . EURO, $ligne->prix_ht * $ligne->qtt)), "LR", 0, "R");
$pdf->setXY(120, $y_start);
$pdf->Cell(20, $y - $y_start, '', "LR", 0, "C");
$pdf->Cell(30, $y - $y_start, '', "LR", 0, "R");
$pdf->Cell(30, $y - $y_start, '', "LR", 0, "R");
$total_ht += $ligne->prix_ht * $ligne->qtt;
$pdf->Ln();
$pdf->Cell(110, 2, "", "LR");
$pdf->Cell(20, 2, "", "LR");
$pdf->Cell(30, 2, "", "LR");
$pdf->Cell(30, 2, "", "LR");
$pdf->Ln();
}
$y_fin = $pdf->getY();
if ($y < 190) {
$pdf->Cell(110, 190 - $y, "", "LRB", 0, "C");
$pdf->Cell(20, 190 - $y, "", "LRB", 0, "C");
$pdf->Cell(30, 190 - $y, "", "LRB", 0, "C");
$pdf->Cell(30, 190 - $y, "", "LRB", 0, "C");
$pdf->Ln();
}
// Total HT
$txt_type_paiement = $facture->type_paiement;
if (preg_match('/eption de cette facture/', $txt_type_paiement) and $facture->language != 'fr_FR') {
$txt_type_paiement = _('upon receipt of invoice');
}
$pdf->SetFont('Arial', '', '11');
示例13: FlyerRendering
//.........这里部分代码省略.........
// Output-Dasteiname zusammenbauen
$outputFile = $outputPath . DIRECTORY_SEPARATOR . $outputPostfix . '_' . basename($inputFile);
// initiate FPDI
$pdf = new FPDI();
echo 'Input: ' . basename($inputFile) . PHP_EOL;
$pageCount = $pdf->setSourceFile($inputFile);
// Importiere Vorder- und Rueckseite
$Vorderseite = $pdf->ImportPage(1);
$Rueckseite = $pdf->ImportPage(2);
// Seitenabmessungen holen
$size = $pdf->getTemplateSize($Vorderseite);
$dokumentBreite = round($size['w'], 2);
$dokumentHoehe = round($size['h'], 2);
echo 'Dokumenten Breite: ' . $dokumentBreite . 'mm' . PHP_EOL;
echo 'Dokumenten Hoehe: ' . $dokumentHoehe . 'mm' . PHP_EOL;
echo 'Anschnitt: ' . $anschnitt . 'mm' . PHP_EOL;
// Vorderseite uebernehmen
// Anfang eines bloeden Hacks wegen des FooterZeilen-Textes.
// Der Footertext laesst sich nur einfügen, wenn die Seite eine A4 Seite ist.
// Keine Ahnung warum!
$pdf->AddPage('L');
$tplVorderseite = $pdf->importPage(1);
$pdf->useTemplate($tplVorderseite);
//Margin ist wegen der Rand-Platzierung des Community Names wichtig.
$pdf->SetMargins(0, 0, 0);
// erstmal alle Fonts laden
echo 'Lade Fonts...' . PHP_EOL;
$pdf->AddFont('lato-bold');
$pdf->AddFont('lato-regular');
$pdf->AddFont('alternategothic');
// Rendern Titel Text
echo 'Verarbeite Titel Text...' . PHP_EOL;
$pdf->SetFont('lato-bold');
$pdf->SetFontSize($kontaktTitelFontSize);
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktTitelPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $config['kontaktTitelText']));
// Rendern Info Text
echo 'Verarbeite Info Text...' . PHP_EOL;
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetFontSize($kontaktInfoFontSize);
foreach ($config['kontaktInfoTexte'] as $a) {
$pdf->SetFont('lato-bold');
$pdf->SetXY($kontaktTitelPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[0]));
$pdf->SetFont('lato-regular');
$pdf->SetXY($kontaktInfoTextPositionX + $anschnitt, $kontaktInfoPositionY + $anschnitt);
$pdf->Write(0, iconv('UTF-8', 'windows-1252', $a[1]));
$kontaktInfoPositionY = $kontaktInfoPositionY + $kontaktInfoZeilenOffsetY;
}
// Rendern Community Logo
echo 'Verarbeite Logo...' . PHP_EOL;
$pdf->Image($config['kontaktLogoDateiName'], $kontaktLogoPositionX + $anschnitt, $config['kontaktLogoPositionY'] + $anschnitt, $config['kontaktLogoWidth'], 0);
// Rendern Fusszeilen Text
echo 'Verarbeite Fusszeile...' . PHP_EOL;
$pdf->SetFont('lato-regular');
$pdf->SetFontSize($kontaktFooterFontSize);
$pdf->SetTextColor(255, 255, 255);
//weiss
$pdf->SetXY($kontaktFooterPositionX + $anschnitt, $kontaktFooterPositionY + $anschnitt);
$pdf->Cell($kontaktFooterWidth, 0, iconv('UTF-8', 'windows-1252', $config['kontaktFusszeileText']), 0, 0, 'C');
// Rendern Community Name
echo 'Verarbeite Community Name...' . PHP_EOL;
$pdf->SetFont('alternategothic');
$pdf->SetFontSize($config['communityNameFontSize']);
$pdf->SetTextColor(0, 0, 0);
//schwarz
$pdf->SetXY($communityNamePositionX + $anschnitt, $communityNamePositionY + $anschnitt);
$pdf->MultiCell($wRechts, 10, iconv('UTF-8', 'windows-1252', $config['communityNameText']), 0, 'C');
// Das war's mit dem Editieren
// Original PDF Rueckseit uebernehmen
$pdf->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplRueckseite = $pdf->importPage(2);
$pdf->useTemplate($tplRueckseite);
// und erstmal abspeichern
echo 'Zwischenspeichern...' . PHP_EOL;
$pdf->Output($outputFile);
// Hier geht jetzt der Hack wegen der Footerzeile weiter
// Die gerade abgespeicherte Datei wird erneut eingelesen
// um dann im Seiten-Format der Ursprungsdatei erneut abgespeichert zu werden.
// Is' doof, muss aber sein
$pdf_2 = new FPDI();
echo 'Erneut laden...' . PHP_EOL;
$pageCount = $pdf_2->setSourceFile($outputFile);
echo 'Feinschliff...' . PHP_EOL;
$Vorderseite_2 = $pdf_2->ImportPage(1);
$Rueckseite_2 = $pdf_2->ImportPage(2);
$pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplVorderseite = $pdf_2->importPage(1);
$pdf_2->useTemplate($tplVorderseite);
$pdf_2->AddPage('L', array($dokumentBreite, $dokumentHoehe));
$tplRueckseite = $pdf_2->importPage(2);
$pdf_2->useTemplate($tplRueckseite);
echo 'Output: ' . basename($outputFile) . PHP_EOL;
$pdf_2->Output($outputFile);
unset($pdf);
unset($pdf_2);
}
示例14: sprintf
$pdf->addPage();
$pdf->useTemplate($hdl);
$pdf->SetFont($wvfont, '', $wvsize);
$pdf->Text($wvname[x], $wvname[y], utf8_decode($firma["name"]));
$pdf->Text($wvstr[x], $wvstr[y], utf8_decode($firma["street"]));
$pdf->Text($wvort[x], $wvort[y], $firma["zipcode"] . " " . utf8_decode($firma["city"]));
$pdf->Text($wvkdnr[x], $wvkdnr[y], $firma["customernumber"]);
$pdf->Text($wvwvnr[x], $wvwvnr[y], $rep['contractnumber']);
$pdf->Text($wvstart[x], $wvstart[y], db2date($rep["anfangdatum"]));
$pdf->Text($wvende[x], $wvende[y], $ende);
$pdf->Text($wvbetrag[x], $wvbetrag[y], sprintf("%0.2f", $rep["betrag"]));
$pdf->SetFont('Helvetica', '', 10);
$bem = $rep["bemerkung"] ? utf8_decode($rep["bemerkung"]) : "Es werden keine Sondervereinbarungen getroffen";
$pdf->SetY($wvbem[y]);
$pdf->SetX($wvbem[x]);
$pdf->MultiCell(0, 6, $bem, 0);
for ($j = 2; $j <= $seiten; $j++) {
$hdl = @$pdf->ImportPage($j);
$pdf->addPage();
$pdf->useTemplate($hdl);
}
$pdf->SetFont($wvfont, '', $wvsize);
$i = 300;
$p = 1;
foreach ($masch as $row) {
if ($i > 270) {
$pdf->addPage();
$pdf->Text($wvkopf[x], $wvkopf[y], "Anhang A (Seite {$p}) zum Wartungsvertrag " . $rep['contractnumber'] . " vom " . db2date($rep["anfangdatum"]));
$i = 40;
$p++;
}