酒店预订平台
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

21 lines
666 B

  1. <?php
  2. use PhpOffice\PhpSpreadsheet\IOFactory;
  3. use PhpOffice\PhpSpreadsheet\Worksheet\PageSetup;
  4. require __DIR__ . '/../Header.php';
  5. $spreadsheet = require __DIR__ . '/../templates/sampleSpreadsheet.php';
  6. $helper->log('Hide grid lines');
  7. $spreadsheet->getActiveSheet()->setShowGridLines(false);
  8. $helper->log('Set orientation to landscape');
  9. $spreadsheet->getActiveSheet()->getPageSetup()->setOrientation(PageSetup::ORIENTATION_LANDSCAPE);
  10. $className = \PhpOffice\PhpSpreadsheet\Writer\Pdf\Mpdf::class;
  11. $helper->log("Write to PDF format using {$className}");
  12. IOFactory::registerWriter('Pdf', $className);
  13. // Save
  14. $helper->write($spreadsheet, __FILE__, ['Pdf']);