ILIAS  release_5-2 Revision v5.2.25-18-g3f80b828510
PHPExcel_Writer_PDF_Core Class Reference
+ Inheritance diagram for PHPExcel_Writer_PDF_Core:
+ Collaboration diagram for PHPExcel_Writer_PDF_Core:

Public Member Functions

 __construct (PHPExcel $phpExcel)
 Create a new PHPExcel_Writer_PDF. More...
 
 getFont ()
 Get Font. More...
 
 setFont ($fontName)
 Set font. More...
 
 getPaperSize ()
 Get Paper Size. More...
 
 setPaperSize ($pValue=PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)
 Set Paper Size. More...
 
 getOrientation ()
 Get Orientation. More...
 
 setOrientation ($pValue=PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)
 Set Orientation. More...
 
 getTempDir ()
 Get temporary storage directory. More...
 
 setTempDir ($pValue='')
 Set temporary storage directory. More...
 
- Public Member Functions inherited from PHPExcel_Writer_HTML
 __construct (PHPExcel $phpExcel)
 Create a new PHPExcel_Writer_HTML. More...
 
 save ($pFilename=null)
 Save PHPExcel to file. More...
 
 getSheetIndex ()
 Get sheet index. More...
 
 setSheetIndex ($pValue=0)
 Set sheet index. More...
 
 getGenerateSheetNavigationBlock ()
 Get sheet index. More...
 
 setGenerateSheetNavigationBlock ($pValue=true)
 Set sheet index. More...
 
 writeAllSheets ()
 Write all sheets (resets sheetIndex to NULL) More...
 
 generateHTMLHeader ($pIncludeStyles=false)
 Generate HTML header. More...
 
 generateSheetData ()
 Generate sheet data. More...
 
 generateNavigation ()
 Generate sheet tabs. More...
 
 generateStyles ($generateSurroundingHTML=true)
 Generate CSS styles. More...
 
 buildCSS ($generateSurroundingHTML=true)
 Build CSS styles. More...
 
 generateHTMLFooter ()
 Generate HTML footer. More...
 
 getImagesRoot ()
 Get images root. More...
 
 setImagesRoot ($pValue='.')
 Set images root. More...
 
 getEmbedImages ()
 Get embed images. More...
 
 setEmbedImages ($pValue='.')
 Set embed images. More...
 
 getUseInlineCss ()
 Get use inline CSS? More...
 
 setUseInlineCss ($pValue=false)
 Set use inline CSS? More...
 
 formatColor ($pValue, $pFormat)
 Add color to formatted string as inline style. More...
 
- Public Member Functions inherited from PHPExcel_Writer_Abstract
 getIncludeCharts ()
 Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object. More...
 
 setIncludeCharts ($pValue=FALSE)
 Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PHPExcel object. More...
 
 getPreCalculateFormulas ()
 Get Pre-Calculate Formulas flag If this is true (the default), then the writer will recalculate all formulae in a workbook when saving, so that the pre-calculated values are immediately available to MS Excel or other office spreadsheet viewer when opening the file If false, then formulae are not calculated on save. More...
 
 setPreCalculateFormulas ($pValue=TRUE)
 Set Pre-Calculate Formulas Set to true (the default) to advise the Writer to calculate all formulae on save Set to false to prevent precalculation of formulae on save. More...
 
 getUseDiskCaching ()
 Get use disk caching where possible? More...
 
 setUseDiskCaching ($pValue=FALSE, $pDirectory=NULL)
 Set use disk caching where possible? More...
 
 getDiskCachingDirectory ()
 Get disk caching directory. More...
 
 save ($pFilename=NULL)
 Save PHPExcel to file. More...
 

Protected Member Functions

 prepareForSave ($pFilename=NULL)
 Save PHPExcel to PDF file, pre-save. More...
 
 restoreStateAfterSave ($fileHandle)
 Save PHPExcel to PDF file, post-save. More...
 

Protected Attributes

 $_tempDir = ''
 
 $_font = 'freesans'
 
 $_orientation = NULL
 
 $_paperSize = NULL
 
- Protected Attributes inherited from PHPExcel_Writer_HTML
 $_phpExcel
 
 $_isPdf = false
 
- Protected Attributes inherited from PHPExcel_Writer_Abstract
 $_includeCharts = FALSE
 
 $_preCalculateFormulas = TRUE
 
 $_useDiskCaching = FALSE
 
 $_diskCachingDirectory = './'
 

Static Protected Attributes

static $_paperSizes
 

Private Attributes

 $_saveArrayReturnType
 

Detailed Description

Definition at line 36 of file Core.php.

Constructor & Destructor Documentation

◆ __construct()

PHPExcel_Writer_PDF_Core::__construct ( PHPExcel  $phpExcel)

Create a new PHPExcel_Writer_PDF.

Parameters
PHPExcel$phpExcelPHPExcel object

Reimplemented from PHPExcel_Writer_HTML.

Reimplemented in PHPExcel_Writer_PDF_DomPDF, PHPExcel_Writer_PDF_mPDF, and PHPExcel_Writer_PDF_tcPDF.

Definition at line 219 of file Core.php.

220 {
221 parent::__construct($phpExcel);
222 $this->setUseInlineCss(TRUE);
223 $this->_tempDir = PHPExcel_Shared_File::sys_get_temp_dir();
224 }
static sys_get_temp_dir()
Get the systems temporary directory.
Definition: File.php:135
setUseInlineCss($pValue=false)
Set use inline CSS?
Definition: HTML.php:1399

References PHPExcel_Writer_HTML\setUseInlineCss(), and PHPExcel_Shared_File\sys_get_temp_dir().

+ Here is the call graph for this function:

Member Function Documentation

◆ getFont()

PHPExcel_Writer_PDF_Core::getFont ( )

Get Font.

Returns
string

Definition at line 231 of file Core.php.

232 {
233 return $this->_font;
234 }

References $_font.

Referenced by PHPExcel_Writer_PDF_tcPDF\save().

+ Here is the caller graph for this function:

◆ getOrientation()

PHPExcel_Writer_PDF_Core::getOrientation ( )

Get Orientation.

Returns
string

Definition at line 278 of file Core.php.

279 {
280 return $this->_orientation;
281 }

References $_orientation.

Referenced by PHPExcel_Writer_PDF_DomPDF\save(), PHPExcel_Writer_PDF_mPDF\save(), and PHPExcel_Writer_PDF_tcPDF\save().

+ Here is the caller graph for this function:

◆ getPaperSize()

PHPExcel_Writer_PDF_Core::getPaperSize ( )

Get Paper Size.

Returns
int

Definition at line 256 of file Core.php.

257 {
258 return $this->_paperSize;
259 }

References $_paperSize.

Referenced by PHPExcel_Writer_PDF_DomPDF\save(), PHPExcel_Writer_PDF_mPDF\save(), and PHPExcel_Writer_PDF_tcPDF\save().

+ Here is the caller graph for this function:

◆ getTempDir()

PHPExcel_Writer_PDF_Core::getTempDir ( )

Get temporary storage directory.

Returns
string

Definition at line 300 of file Core.php.

301 {
302 return $this->_tempDir;
303 }

References $_tempDir.

◆ prepareForSave()

PHPExcel_Writer_PDF_Core::prepareForSave (   $pFilename = NULL)
protected

Save PHPExcel to PDF file, pre-save.

Parameters
string$pFilenameName of the file to save as
Exceptions
PHPExcel_Writer_Exception

Definition at line 328 of file Core.php.

329 {
330 // garbage collect
331 $this->_phpExcel->garbageCollect();
332
333 $this->_saveArrayReturnType = PHPExcel_Calculation::getArrayReturnType();
335
336 // Open file
337 $fileHandle = fopen($pFilename, 'w');
338 if ($fileHandle === FALSE) {
339 throw new PHPExcel_Writer_Exception("Could not open file $pFilename for writing.");
340 }
341
342 // Set PDF
343 $this->_isPdf = TRUE;
344 // Build CSS
345 $this->buildCSS(TRUE);
346
347 return $fileHandle;
348 }
static getArrayReturnType()
Return the Array Return Type (Array or Value of first element in the array)
static setArrayReturnType($returnType)
Set the Array Return Type (Array or Value of first element in the array)
buildCSS($generateSurroundingHTML=true)
Build CSS styles.
Definition: HTML.php:720

References PHPExcel_Writer_HTML\buildCSS(), PHPExcel_Calculation\getArrayReturnType(), PHPExcel_Calculation\RETURN_ARRAY_AS_VALUE, and PHPExcel_Calculation\setArrayReturnType().

+ Here is the call graph for this function:

◆ restoreStateAfterSave()

PHPExcel_Writer_PDF_Core::restoreStateAfterSave (   $fileHandle)
protected

Save PHPExcel to PDF file, post-save.

Parameters
resource$fileHandle
Exceptions
PHPExcel_Writer_Exception

Definition at line 356 of file Core.php.

357 {
358 // Close file
359 fclose($fileHandle);
360
361 PHPExcel_Calculation::setArrayReturnType($this->_saveArrayReturnType);
362 }

References PHPExcel_Calculation\setArrayReturnType().

+ Here is the call graph for this function:

◆ setFont()

PHPExcel_Writer_PDF_Core::setFont (   $fontName)

Set font.

Examples: 'arialunicid0-chinese-simplified' 'arialunicid0-chinese-traditional' 'arialunicid0-korean' 'arialunicid0-japanese'

Parameters
string$fontName

Definition at line 245 of file Core.php.

246 {
247 $this->_font = $fontName;
248 return $this;
249 }

◆ setOrientation()

PHPExcel_Writer_PDF_Core::setOrientation (   $pValue = PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT)

Set Orientation.

Parameters
string$pValuePage orientation
Returns
PHPExcel_Writer_PDF

Definition at line 289 of file Core.php.

290 {
291 $this->_orientation = $pValue;
292 return $this;
293 }

Referenced by PHPExcel_Writer_PDF_mPDF\save().

+ Here is the caller graph for this function:

◆ setPaperSize()

PHPExcel_Writer_PDF_Core::setPaperSize (   $pValue = PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER)

Set Paper Size.

Parameters
string$pValuePaper size
Returns
PHPExcel_Writer_PDF

Definition at line 267 of file Core.php.

268 {
269 $this->_paperSize = $pValue;
270 return $this;
271 }

◆ setTempDir()

PHPExcel_Writer_PDF_Core::setTempDir (   $pValue = '')

Set temporary storage directory.

Parameters
string$pValueTemporary storage directory
Exceptions
PHPExcel_Writer_Exceptionwhen directory does not exist
Returns
PHPExcel_Writer_PDF

Definition at line 312 of file Core.php.

313 {
314 if (is_dir($pValue)) {
315 $this->_tempDir = $pValue;
316 } else {
317 throw new PHPExcel_Writer_Exception("Directory does not exist: $pValue");
318 }
319 return $this;
320 }

Field Documentation

◆ $_font

PHPExcel_Writer_PDF_Core::$_font = 'freesans'
protected

Definition at line 50 of file Core.php.

Referenced by getFont().

◆ $_orientation

PHPExcel_Writer_PDF_Core::$_orientation = NULL
protected

Definition at line 57 of file Core.php.

Referenced by getOrientation().

◆ $_paperSize

PHPExcel_Writer_PDF_Core::$_paperSize = NULL
protected

Definition at line 64 of file Core.php.

Referenced by getPaperSize().

◆ $_paperSizes

PHPExcel_Writer_PDF_Core::$_paperSizes
staticprotected

Definition at line 79 of file Core.php.

◆ $_saveArrayReturnType

PHPExcel_Writer_PDF_Core::$_saveArrayReturnType
private

Definition at line 72 of file Core.php.

◆ $_tempDir

PHPExcel_Writer_PDF_Core::$_tempDir = ''
protected

Definition at line 43 of file Core.php.

Referenced by getTempDir().


The documentation for this class was generated from the following file: