本文整理汇总了PHP中MYPDF::lastPage方法的典型用法代码示例。如果您正苦于以下问题:PHP MYPDF::lastPage方法的具体用法?PHP MYPDF::lastPage怎么用?PHP MYPDF::lastPage使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类MYPDF
的用法示例。
在下文中一共展示了MYPDF::lastPage方法的7个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。
示例1: generatePdfReport
//.........这里部分代码省略.........
}
if (!empty($entry->answer2)) {
if (empty($responses[$entry->response_id]->questions[$entry->question_id]->answer)) {
$responses[$entry->response_id]->questions[$entry->question_id]->answer = $entry->answer2;
} else {
$responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $entry->answer2;
}
}
if (!empty($entry->free_text)) {
// do special types formatting //
if ($responses[$entry->response_id]->questions[$entry->question_id]->question_type == S_SPECIAL_NAME) {
$names = explode('|', $entry->free_text);
if (!empty($names)) {
$entry->free_text = $names[0] . '. ' . $names[1] . ' ' . $names[2];
} else {
$entry->free_text = '';
}
} else {
if ($responses[$entry->response_id]->questions[$entry->question_id]->question_type == S_SPECIAL_ADDRESS) {
$parts = explode('|||', $entry->free_text);
if (count($parts) == 7) {
$entry->free_text = '<address><strong>' . CJFunctions::escape($parts[0]) . '</strong><br>';
$entry->free_text .= CJFunctions::escape($parts[1]) . '<br>';
if (!empty($parts[2])) {
$entry->free_text .= CJFunctions::escape($parts[2]) . '<br>';
}
$entry->free_text .= CJFunctions::escape($parts[3]) . ', ' . CJFunctions::escape($parts[4]) . ', ' . CJFunctions::escape($parts[6]) . '<br>';
$entry->free_text .= !empty($countries[$parts[5]]) ? $countries[$parts[5]]->country_name : CJFunctions::escape($parts[5]);
} else {
$entry->free_text = '';
}
}
}
// do special types formatting //
if (empty($responses[$entry->response_id]->questions[$entry->question_id]->answer)) {
$responses[$entry->response_id]->questions[$entry->question_id]->answer = $entry->free_text;
} else {
$responses[$entry->response_id]->questions[$entry->question_id]->answer .= '<br/>' . $entry->free_text;
}
}
}
}
}
$response_rows = array();
foreach ($responses as $id => $response) {
$string = '<table class="table table-striped" width="100%">';
$string = $string . '<tr><th width="30%"><strong>Response ID:</strong></th><td width="70%">' . $id . '</td></tr>';
$string = $string . '<tr><th><strong>Response Date:</strong></th><td>' . $response->created . '</td></tr>';
$string = $string . '<tr><th><strong>User ID:</strong></th><td>' . $response->created_by . '</td></tr>';
$string = $string . '<tr><th><strong>Username:</strong></th><td>' . $response->username . '</td></tr>';
$string = $string . '<tr><th><strong>User Display Name:</strong></th><td>' . $response->name . '</td></tr>';
if ($include_email_in_reports == 1) {
$string = $string . '<tr><td><strong>Email:</strong></td><td>' . $response->email . '</td></tr>';
}
foreach ($pdfData->questions as $question) {
$string = $string . '<tr><td colspan="2"> <hr></td></tr>';
$string = $string . '<tr><th colspan="2"><h3>' . $question->title . '</h3></th></tr>';
if (!empty($question->description)) {
$string = $string . '<tr><td colspan="2">' . $question->description . '</td></tr>';
}
$string = $string . '<tr><td colspan="2"> </td></tr>';
$string = $string . '<tr><td colspan="2">' . $response->questions[$question->id]->answer . '</td></tr>';
}
$string = $string . '</table>';
array_push($response_rows, $string);
}
// create new PDF document
require_once JPATH_COMPONENT_SITE . '/helpers/tcpdf.php';
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default header data
$pdf->SetHeaderData('logo.png', PDF_HEADER_LOGO_WIDTH, $pdfData->title, '');
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('corejoomla.com');
$pdf->SetTitle('Survey Report');
$pdf->SetSubject('Survey Responses Report');
$pdf->SetKeywords('survey, report');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// ---------------------------------------------------------
// set font
$pdf->SetFont('freesans');
foreach ($response_rows as $i => $response) {
$pdf->AddPage();
$pdf->writeHTML($response, true, false, true, false, '');
$pdf->lastPage();
}
$pdf->Output($fileName, $mode);
}
示例2:
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('times', '', 9);
// add a page
$pdf->AddPage();
//$pdf->SetCellPadding(0);
//$pdf->SetLineWidth(2);
$text = 'Cras eros leo, porttitor porta, accumsan fermentum, ornare ac, est. Praesent dui lorem, imperdiet at, cursus sed, facilisis aliquam, nibh. Nulla accumsan nonummy diam. Donec tempus. Etiam posuere. Proin lectus. Donec purus. Duis in sem pretium urna feugiat vehicula. Ut suscipit velit eget massa. Nam nonummy, enim commodo euismod placerat, tortor elit tempus lectus, quis suscipit metus lorem blandit turpis. Cras nulla nulla, hendrerit et, porttitor eu, adipiscing et, lorem. Pellentesque sit amet augue. Nam lobortis sollicitudin turpis. Sed velit est, mollis non, elementum ac, tempor quis, arcu. Aliquam a pede. Quisque arcu magna, nonummy eget, hendrerit a, lacinia egestas, enim. Donec bibendum. In a ipsum. Sed gravida facilisis sem. Nam tempus, tellus ut tincidunt elementum, augue tellus fermentum quam, sit amet lobortis sem ipsum sed elit.In accumsan ligula nonummy libero. Pellentesque habitant morbi tristique senectus et netus et malesuada fames ac turpis egestas. Sed vel risus. Vestibulum ut lacus. Proin fermentum, erat a commodo lacinia, lacus dui hendrerit nulla, et pellentesque neque diam at elit. Fusce blandit, dolor pharetra bibendum lacinia, augue sem scelerisque sem, bibendum sodales orci justo et sapien. Etiam nec eros ac turpis lobortis interdum. Integer volutpat nibh a lacus. Duis erat est, rhoncus nec, rhoncus viverra, pulvinar sit amet, leo. Duis blandit. Nunc convallis nisi ac ante. Cras nunc massa, molestie quis, porttitor a, volutpat accumsan, quam. Nullam a erat vitae orci bibendum viverra. Donec tristique leo eget nisl adipiscing pellentesque. Nam vehicula, enim quis aliquet euismod, dolor sem pellentesque libero, nec blandit nisi erat sit amet dui. Integer sapien. Donec molestie metus in neque. Suspendisse porttitor enim a nisl.Maecenas lacinia dolor ornare ligula. Maecenas eu eros. Curabitur non leo non nulla fringilla auctor. Etiam porttitor diam vel quam. Maecenas sed ligula nec massa venenatis faucibus. Curabitur aliquet accumsan tellus. Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Suspendisse vitae eros ac purus fermentum suscipit. Curabitur interdum orci a mi. Nunc placerat diam in elit.Nunc elit. Maecenas vulputate, sem sit amet condimentum lacinia, ipsum eros porta dolor, sed luctus magna ante eu nisl. Proin non nisi. Vivamus sed quam et est lobortis porttitor. Cras sit amet urna sit amet elit ultricies consequat. Praesent blandit elit ut urna. Cras hendrerit rhoncus sapien. Fusce ullamcorper lobortis ipsum. Pellentesque vel velit at sem blandit facilisis. Nulla aliquet orci id metus.';
// print some rows just as example
for ($i = 0; $i < 5; $i++) {
$pdf->MultiRow('Row ' . ($i + 1), $text . "\n");
}
// reset pointer to the last page
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output('example_020.pdf', 'I');
//============================================================+
// END OF FILE
//============================================================+
?>
示例3: generarReporte
public function generarReporte($atributosReceta, $labelCabecera, $labelDetalle, $labelPie, $datosCabecera, $datosDetalle, $datosExamen, $datosExamenUni, $datosGrupo, $datosPie, $modo, $nombreReceta, $parametros)
{
$lblCabecera = array();
$lblDetalle = array();
$lblPie = array();
$styleCL = array();
$styleCD = array();
$styleDL = array();
$styleDD = array();
$stylePL = array();
$stylePD = array();
$o_classGeneral = new classGeneral();
$o_classGeneral->setLabelCabecera($labelCabecera, $atributosReceta);
$styleCL = $o_classGeneral->getStyleCL();
$styleCD = $o_classGeneral->getStyleCD();
$lblCabecera = $o_classGeneral->getLblCabecera();
$o_classGeneral->setLabelDetalle($labelDetalle, $atributosReceta);
$styleDL = $o_classGeneral->getStyleDL();
$styleDD = $o_classGeneral->getStyleDD();
$lblDetalle = $o_classGeneral->getLblDetalle();
$o_classGeneral->setLabelPie($labelPie, $atributosReceta);
$stylePL = $o_classGeneral->getStylePL();
$stylePD = $o_classGeneral->getStylePD();
$lblPie = $o_classGeneral->getLblPie();
$pdf = new MYPDF($parametros["PDF_PAGE_ORIENTATION"], PDF_UNIT, $parametros["PDF_PAGE_FORMAT"], true, 'UTF-8', false);
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Juan Carlos Ludeña Montesinos');
$pdf->SetTitle('Generardor de Reportes');
$pdf->SetSubject('Generardor de Reportes');
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
$pdf->setPrintHeader($parametros["PRINT_HEADER"]);
$pdf->setPrintFooter($parametros["PRINT_FOOTER"]);
$pdf->SetMargins($parametros["PDF_MARGIN_LEFT"], $parametros["PDF_MARGIN_TOP"], $parametros["PDF_MARGIN_RIGHT"]);
$pdf->SetHeaderMargin($parametros["PDF_MARGIN_HEADER"]);
$pdf->SetFooterMargin($parametros["PDF_MARGIN_FOOTER"]);
$pdf->SetAutoPageBreak($parametros["AUTO_PAGE_BREAK"], $parametros["PDF_MARGIN_BOTTOM"]);
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
$pdf->SetFont('helvetica', '', 6);
$pdf->AddPage();
$style = array('position' => '', 'align' => 'C', 'stretch' => false, 'fitwidth' => true, 'cellfitalign' => '', 'border' => false, 'hpadding' => 'auto', 'vpadding' => 'auto', 'fgcolor' => array(0, 0, 0), 'bgcolor' => false, 'text' => false, 'font' => 'helvetica', 'fontsize' => 8, 'stretchtext' => 4);
$pdf->write1DBarcode($parametros["CODIGO_DE_BARRAS"], 'C39', 75, 278, 70, 8, 0.4, $style, 'N');
$pdf->CargarDatos($lblCabecera, $lblDetalle, $lblPie, $datosCabecera, $datosDetalle, $datosExamen, $datosExamenUni, $datosGrupo, $datosPie, $styleCL, $styleDL, $stylePL, $styleCD, $styleDD, $stylePD, $modo);
$pdf->lastPage();
$pdf->Output($nombreReceta, 'I');
}
示例4: getModel
function dispNstore_digitalCertificate()
{
$oNstore_digitalModel = getModel('nstore_digital');
$logged_info = Context::get('logged_info');
$cart_srl = Context::get('cart_srl');
if (!Context::get('is_logged')) {
return new Object(-1, 'msg_login_required');
}
$config = $oNstore_digitalModel->getModuleConfig();
$item_info = $oNstore_digitalModel->getPurchasedItem($logged_info->member_srl, $cart_srl);
Context::set('item_info', $item_info);
if (!in_array($item_info->order_status, array('3'))) {
return new Object(-1, '구매완료된 상품이 아닙니다.');
}
// create new PDF document
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Nicola Asuni');
$pdf->SetTitle('TCPDF Example 006');
$pdf->SetSubject('TCPDF Tutorial');
$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
/*
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 006', PDF_HEADER_STRING);
*/
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
//$pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// remove default header/footer
//$pdf->setPrintHeader(false);
$pdf->setPrintFooter(false);
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
//$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
//$pdf->SetFont('dejavusans', '', 10);
$pdf->SetFont('cid0kr', '', 16);
// table line height
//$pdf->setCellHeightRatio(1.9);
$pdf->setCellHeightRatio(1.7);
// add a page
$pdf->AddPage();
// output the HTML content
$this->setTemplatePath($this->module_path . "tpl");
$oTemplate =& TemplateHandler::getInstance();
$output = $oTemplate->compile($this->module_path . 'tpl', 'certificate');
$pdf->writeHTML($output, true, false, true, false, '');
// reset pointer to the last page
$pdf->lastPage();
//Close and output PDF document
$pdf->Output('certificate.pdf', 'I');
exit;
}
示例5: download_consolidated_pdf_report
public function download_consolidated_pdf_report()
{
$user = JFactory::getUser();
$app = JFactory::getApplication();
$model = $this->getModel('survey');
$params = JComponentHelper::getParams(S_APP_NAME);
$id = $app->input->getInt('id', 0);
if (!$id || !$model->authorize_survey($id)) {
CJFunctions::throw_error(JText::_('MSG_UNAUTHORIZED'), 401);
} else {
$wysiwyg = $user->authorise('core.wysiwyg', S_APP_NAME) ? true : false;
$bbcode = $wysiwyg && $params->get('default_editor', 'bbcode') == 'bbcode';
$content = $params->get('process_content_plugins', 0) == 1;
require_once JPATH_COMPONENT . '/helpers/reports.php';
$generator = new SurveyReports($wysiwyg, $bbcode, $content);
$survey = $model->get_consolidated_report($id);
$headStyles = array();
$headStyles[] = CJLIB_URI . '/bootstrap/css/bootstrap.min.css';
$headStyles[] = JURI::root(true) . '/media/' . S_APP_NAME . '/css/cj.surveys.min.css';
$headScripts = array();
$headScripts[] = CJLIB_URI . '/jquery/jquery.min.js';
$headScripts[] = CJLIB_URI . '/jquery/jquery.noconflict.js';
$headScripts[] = CJLIB_URI . '/bootstrap/js/bootstrap.min.js';
$headScripts[] = 'https://www.google.com/jsapi';
$headScripts[] = JURI::root(true) . '/media/' . S_APP_NAME . '/js/cj.surveys.min.js';
$html = '<html xmlns="http://www.w3.org/1999/xhtml" dir="' . JFactory::getDocument()->direction . '"><head>';
$html = $html . '<meta name="viewport" content="width=device-width, initial-scale=1.0" /><meta http-equiv="content-type" content="text/html; charset=utf-8" />';
// foreach ($headStyles as $style)
// {
// $html = $html . '<link rel="stylesheet" href="'.$style.'" type="text/css" />';
// }
// foreach ($headScripts as $script)
// {
// $html = $html . '<script src="'.$script.'" type="text/javascript"></script>';
// }
// $html .= '<script type="text/javascript">google.load("visualization", "1", {packages:["corechart"]}); google.setOnLoadCallback(SurveyFactory.draw_consolidated_charts);</script>';
$html .= '</head><body><div id="cj-wrapper" class="container-fuild"><div class="reports-wrapper margin-top-20">';
$html .= '<h2 class="page-header margin-bottom-10">' . CJFunctions::escape($survey->title) . '</h2>';
foreach ($survey->questions as $item) {
switch ($item->question_type) {
case 1:
$html .= $generator->get_page_header_question($item, '');
break;
case 2:
case 3:
case 4:
case 11:
case 12:
$html .= $generator->get_choice_question($item, '');
break;
case 5:
case 6:
$html .= $generator->get_grid_question($item, '');
break;
}
}
$html .= '</div></div></body></html>';
// All validations done, write data now
$fileName = 'survey_' . $id . '_' . date('dmYHis') . '.pdf';
// create new PDF document
require_once JPATH_COMPONENT_SITE . '/helpers/tcpdf.php';
$pdf = new MYPDF('P', PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set default header data
$pdf->SetHeaderData('logo.png', PDF_HEADER_LOGO_WIDTH, $survey->title, '');
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('corejoomla.com');
$pdf->SetTitle('Survey Report');
$pdf->SetSubject('Consolidated Report');
$pdf->SetKeywords('survey, report');
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
//set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
//set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// ---------------------------------------------------------
// set font
$pdf->SetFont('freesans');
$pdf->AddPage();
$pdf->writeHTML($html, true, false, true, false, '');
$pdf->lastPage();
$pdf->Output($fileName, $mode);
jexit();
}
}
示例6: setup_pdf
public function setup_pdf()
{
//echo "setup_pdf";
$pdf = new MYPDF(PDF_PAGE_ORIENTATION, PDF_UNIT, PDF_PAGE_FORMAT, true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Havering Carepoint');
$pdf->SetTitle($this->post_title);
$pdf->SetSubject($this->post_title);
// set default header data
$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, '', '');
// // set header and footer fonts
// $pdf->setHeaderFont(Array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
// $pdf->setFooterFont(Array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// // set default monospaced font
// $pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// set margins
$pdf->SetMargins(PDF_MARGIN_LEFT, PDF_MARGIN_TOP, PDF_MARGIN_RIGHT);
$pdf->SetHeaderMargin(PDF_MARGIN_HEADER);
$pdf->SetFooterMargin(PDF_MARGIN_FOOTER);
// set auto page breaks
$pdf->SetAutoPageBreak(TRUE, PDF_MARGIN_BOTTOM);
// // set image scale factor
// $pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
// // set font
// $pdf->SetFont('dejavusans', '', 10);
// add a page
$pdf->AddPage();
// output the HTML content
$html = '<h1>'.$this->post_title.'</h1>'.apply_filters('the_content', $this->post_content);
$html .= '<br/><small>This PDF was downloaded from: <a href="'.get_permalink($this->post_id).'">'.get_permalink($this->post_id).'</a></small>';
if(get_field('nhs_choices', $this->post_id) != ""):
$html .= '<style>
.nhs-choices-label{
float: left;
display: block;
padding: 5px;
margin-bottom: 20px;
border: 3px solid #DFDFDF;}
</style>
<table class="nhs-choices-label">
<tr>
<td>
<small>This article is sourced from:</small>
<img src="'.get_bloginfo("template_url").'/library/images/nhs-choices-logo.jpg" alt="NHS Choices">
</td>
</tr>
</table>';
endif;
$pdf->writeHTML($html, true, false, true, false, '');
// reset pointer to the last page
$pdf->lastPage();
//Close and output PDF document
$pdf->Output($this->post_title.'.pdf', 'I');
}
示例7: generarMYPDF
public function generarMYPDF($atributosReceta, $labelCabecera, $labelDetalle, $labelPie, $datosCabecera, $datosDetalle, $datosPie, $modo, $nombreReceta, $parametros)
{
/* ======================================= Obs ============================================ */
// width->0, height->1, top->2, left->3, color->4 TipoLetra=>5 EstiloLetra=>6 TamañoLetra=>6
/* ===================================================================================================== */
$lblCabecera = array();
$lblDetalle = array();
$lblPie = array();
$styleCL = array();
$styleCD = array();
$styleDL = array();
$styleDD = array();
$stylePL = array();
$stylePD = array();
$o_classGeneral = new classGeneral();
$o_classGeneral->setLabelCabecera($labelCabecera, $atributosReceta);
$styleCL = $o_classGeneral->getStyleCL();
$styleCD = $o_classGeneral->getStyleCD();
$lblCabecera = $o_classGeneral->getLblCabecera();
$o_classGeneral->setLabelDetalle($labelDetalle, $atributosReceta);
$styleDL = $o_classGeneral->getStyleDL();
$styleDD = $o_classGeneral->getStyleDD();
$lblDetalle = $o_classGeneral->getLblDetalle();
$o_classGeneral->setLabelPie($labelPie, $atributosReceta);
$stylePL = $o_classGeneral->getStylePL();
$stylePD = $o_classGeneral->getStylePD();
$lblPie = $o_classGeneral->getLblPie();
/* ====================================================================================================== */
// create new PDF document //PDF_PAGE_ORIENTATION(P,L)
$pdf = new MYPDF($parametros["PDF_PAGE_ORIENTATION"], PDF_UNIT, $parametros["PDF_PAGE_FORMAT"], true, 'UTF-8', false);
// set document information
$pdf->SetCreator(PDF_CREATOR);
$pdf->SetAuthor('Juan Carlos Ludeña Montesinos');
$pdf->SetTitle('Generardor de Reportes');
$pdf->SetSubject('Generardor de Reportes');
//$pdf->SetKeywords('TCPDF, PDF, example, test, guide');
// set default header data
//$pdf->SetHeaderData(PDF_HEADER_LOGO, PDF_HEADER_LOGO_WIDTH, PDF_HEADER_TITLE.' 011', PDF_HEADER_STRING);
// set header and footer fonts
$pdf->setHeaderFont(array(PDF_FONT_NAME_MAIN, '', PDF_FONT_SIZE_MAIN));
$pdf->setFooterFont(array(PDF_FONT_NAME_DATA, '', PDF_FONT_SIZE_DATA));
// set default monospaced font
$pdf->SetDefaultMonospacedFont(PDF_FONT_MONOSPACED);
// remove default header/footer
$pdf->setPrintHeader($parametros["PRINT_HEADER"]);
$pdf->setPrintFooter($parametros["PRINT_FOOTER"]);
//set margins
$pdf->SetMargins($parametros["PDF_MARGIN_LEFT"], $parametros["PDF_MARGIN_TOP"], $parametros["PDF_MARGIN_RIGHT"]);
$pdf->SetHeaderMargin($parametros["PDF_MARGIN_HEADER"]);
$pdf->SetFooterMargin($parametros["PDF_MARGIN_FOOTER"]);
//set auto page breaks
$pdf->SetAutoPageBreak($parametros["AUTO_PAGE_BREAK"], $parametros["PDF_MARGIN_BOTTOM"]);
//set image scale factor
$pdf->setImageScale(PDF_IMAGE_SCALE_RATIO);
//set some language-dependent strings
//$pdf->setLanguageArray($l);
// ---------------------------------------------------------
// set font
$pdf->SetFont('helvetica', '', 6);
// add a page
$pdf->AddPage();
//Data loading
// print colored table
$pdf->ColoredTable($lblCabecera, $lblDetalle, $lblPie, $datosCabecera, $datosDetalle, $datosPie, $styleCL, $styleDL, $stylePL, $styleCD, $styleDD, $stylePD, $modo);
$pdf->lastPage();
// ---------------------------------------------------------
//Close and output PDF document
$pdf->Output($nombreReceta, 'I');
//$pdf->extractCSSproperties();
//============================================================+
// END OF FILE
//============================================================+
}