_margin_top=20; $pdf = new TCPDF('L', 'mm', 'A4', true, 'UTF-8', false); $document->_engine =& $pdf; $pdf->SetMargins($document->_margin_left, $document->_margin_top, $document->_margin_right); $pdf->SetAutoPageBreak(TRUE, $document->_margin_bottom); $pdf->SetHeaderMargin($document->_margin_header); $pdf->SetFooterMargin($document->_margin_footer); //$pdf->setImageScale($document->_image_scale); $currentDate = new JDate(); $currentDate->setOffset(date('Z')/3600.0); $document->setHeader(JText::_('Date'). ": " . $currentDate->toFormat("%d/%m/%y %H:%M")); $document->setTitle(JText::_('VoxelCare Worksheet')); $document->setName('Manufacturing Report'); $modelManufacturingOrders =& $this->getModel('manufacturingorders'); $ids = JRequest::getVar('cid','array',array()); $modelManufacturingOrders->searchids = $ids; $abbs =& $modelManufacturingOrders->getMaterials(); $orders =& $modelManufacturingOrders->getData(); $pagination =& $modelManufacturingOrders->getPagination(); $lists = & $modelManufacturingOrders->getList(); $modelOrderAttribute =& $this->getModel('orderattribute'); $this->assignRef('orders', $orders); $this->assignRef('pagination', $pagination); $this->assignRef('lists', $lists); $this->assignRef('att',$modelOrderAttribute); $this->assignRef('abbs',$abbs); parent::display($tpl); }// function }// class ?>