29error_reporting(E_ALL);
30ini_set(
'display_errors', TRUE);
31ini_set(
'display_startup_errors', TRUE);
32date_default_timezone_set(
'Europe/London');
35 die(
'This example should only be run from a Web Browser');
38require_once dirname(__FILE__) .
'/../Classes/PHPExcel.php';
56$objPHPExcel->getProperties()->setCreator(
"Maarten Balliauw")
57 ->setLastModifiedBy(
"Maarten Balliauw")
58 ->setTitle(
"PDF Test Document")
59 ->setSubject(
"PDF Test Document")
60 ->setDescription(
"Test document for PDF, generated using PHP classes.")
61 ->setKeywords(
"pdf php")
62 ->setCategory(
"Test result file");
67 ->setCellValue(
'A1',
'Hello')
68 ->setCellValue(
'B2',
'world!')
69 ->setCellValue(
'C1',
'Hello')
70 ->setCellValue(
'D2',
'world!');
74 ->setCellValue(
'A4',
'Miscellaneous glyphs')
75 ->setCellValue(
'A5',
'éàèùâêîôûëïüÿäöüç');
90 'NOTICE: Please set the $rendererName and $rendererLibraryPath values' .
92 'at the top of this script as appropriate for your directory structure'
98header(
'Content-Type: application/pdf');
99header(
'Content-Disposition: attachment;filename="01simple.pdf"');
100header(
'Cache-Control: max-age=0');
$rendererName
Include PHPExcel.
An exception for terminatinating execution or to throw for unit testing.
static createWriter(PHPExcel $phpExcel, $writerType='')
Create PHPExcel_Writer_IWriter.
static setPdfRenderer($libraryName, $libraryBaseDir)
Set details of the external library that PHPExcel should use for rendering PDF files.