function combinetickets($info)
 {
     ## Required helpers to create this PDF invoice
     ## Do NOT edit the required files! It will damage your component.
     include_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'assets' . DS . 'pdf' . DS . 'fpdf' . DS . 'fpdf.php';
     include_once JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'assets' . DS . 'pdf' . DS . 'fpdi_ean13.php';
     ## initiate FPDI
     $initrow =& $info[0];
     $pdf = new FPDI_EAN13($initrow->ticket_orientation, 'mm', $initrow->ticket_size);
     $foutn = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'tickets' . DS . 'eTickets-' . $initrow->ordercode . '.pdf';
     for ($i = 0, $n = count($info); $i < $n; $i++) {
         $pdf->addPage();
         $row =& $info[$i];
         $fn = JPATH_ADMINISTRATOR . DS . 'components' . DS . 'com_ticketmaster' . DS . 'tickets' . DS . 'eTicket-' . $row->orderid . '.pdf';
         $pdf->setSourceFile($fn);
         $tplIdx = $pdf->importPage(1);
         ## use the imported page and place it at point 0,0 with a width of 210 mm (A4 Format)
         $pdf->useTemplate($tplIdx, 0, 0, 0);
         ## add a page
     }
     $file = basename(tempnam('.', 'tmp'));
     rename($file, JPATH_SITE . DS . 'tmp' . DS . $file . '.pdf');
     $file .= '.pdf';
     ## Save PDF to file now!!
     $pdf->Output(JPATH_SITE . DS . 'tmp' . DS . $file, 'F');
     ## Now move the file away for security reasons
     ## Import the Joomla! Filesystem.
     jimport('joomla.filesystem.file');
     ## Copy the file to a new directory.
     $src = JPATH_SITE . DS . 'tmp' . DS . $file;
     ## Now move the file away for security reasons
     ## Import the Joomla! Filesystem.
     jimport('joomla.filesystem.file');
     ## Copy the file to a new directory.
     $src = JPATH_SITE . DS . 'tmp' . DS . $file;
     ## The new name for the ticket
     $dest = $foutn;
     ## Copy the file now.
     JFile::copy($src, $dest);
     ## The old temporary file needs to be deleted.
     JFile::delete($src);
     return $foutn;
 }