\PHPExcel_Writer_PDF_DomPDF

PHPExcel_Writer_PDF_DomPDF

@category PHPExcel

Summary

Methods
Properties
Constants
__construct()
getFont()
setFont()
getPaperSize()
setPaperSize()
getOrientation()
setOrientation()
getTempDir()
setTempDir()
save()
getSheetIndex()
setSheetIndex()
getGenerateSheetNavigationBlock()
setGenerateSheetNavigationBlock()
writeAllSheets()
generateHTMLHeader()
generateSheetData()
generateNavigation()
generateStyles()
buildCSS()
generateHTMLFooter()
getImagesRoot()
setImagesRoot()
getEmbedImages()
setEmbedImages()
getUseInlineCss()
setUseInlineCss()
formatColor()
getIncludeCharts()
setIncludeCharts()
getPreCalculateFormulas()
setPreCalculateFormulas()
getUseDiskCaching()
setUseDiskCaching()
getDiskCachingDirectory()
No public properties found
No constants found
prepareForSave()
restoreStateAfterSave()
$_tempDir
$_font
$_orientation
$_paperSize
$_paperSizes
$_phpExcel
$_isPdf
$_includeCharts
$_preCalculateFormulas
$_useDiskCaching
$_diskCachingDirectory
N/A
_mapVAlign()
_mapHAlign()
_mapBorderStyle()
_extendRowsForChartsAndImages()
_writeImageInCell()
_writeChartInCell()
_createCSSStyle()
_createCSSStyleAlignment()
_createCSSStyleFont()
_createCSSStyleBorders()
_createCSSStyleBorder()
_createCSSStyleFill()
_generateTableHeader()
_generateTableFooter()
_generateRow()
_assembleCSS()
_calculateSpans()
_setMargins()
$_saveArrayReturnType
$_sheetIndex
$_imagesRoot
$_embedImages
$_useInlineCss
$_cssStyles
$_columnWidths
$_defaultFont
$_spansAreCalculated
$_isSpannedCell
$_isBaseCell
$_isSpannedRow
$_generateSheetNavigationBlock
N/A

Properties

$_tempDir

$_tempDir : string

Temporary storage directory

Type

string

$_font

$_font : string

Font

Type

string

$_orientation

$_orientation : string

Orientation (Over-ride)

Type

string

$_paperSize

$_paperSize : integer

Paper size (Over-ride)

Type

integer

$_paperSizes

$_paperSizes : array

Paper Sizes xRef List

Type

array

$_phpExcel

$_phpExcel : \PHPExcel

PHPExcel object

Type

\PHPExcel

$_isPdf

$_isPdf : boolean

Is the current writer creating PDF?

Type

boolean

$_includeCharts

$_includeCharts : boolean

Write charts that are defined in the workbook? Identifies whether the Writer should write definitions for any charts that exist in the PHPExcel object;

Type

boolean

$_preCalculateFormulas

$_preCalculateFormulas : boolean

Pre-calculate formulas Forces PHPExcel to 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

Type

boolean

$_useDiskCaching

$_useDiskCaching : boolean

Use disk caching where possible?

Type

boolean

$_diskCachingDirectory

$_diskCachingDirectory : string

Disk caching directory

Type

string

$_saveArrayReturnType

$_saveArrayReturnType : string

Temporary storage for Save Array Return type

Type

string

$_sheetIndex

$_sheetIndex : integer

Sheet index to write

Type

integer

$_imagesRoot

$_imagesRoot : string

Images root

Type

string

$_embedImages

$_embedImages : boolean

embed images, or link to images

Type

boolean

$_useInlineCss

$_useInlineCss : boolean

Use inline CSS?

Type

boolean

$_cssStyles

$_cssStyles : array

Array of CSS styles

Type

array

$_columnWidths

$_columnWidths : array

Array of column widths in points

Type

array

$_spansAreCalculated

$_spansAreCalculated : boolean

Flag whether spans have been calculated

Type

boolean

$_isSpannedCell

$_isSpannedCell : array

Excel cells that should not be written as HTML cells

Type

array

$_isBaseCell

$_isBaseCell : array

Excel cells that are upper-left corner in a cell merge

Type

array

$_isSpannedRow

$_isSpannedRow : array

Excel rows that should not be written as HTML rows

Type

array

$_generateSheetNavigationBlock

$_generateSheetNavigationBlock : boolean

Generate the Navigation block

Type

boolean

Methods

__construct()

__construct(\PHPExcel  $phpExcel) 

Create a new PHPExcel_Writer_PDF

@param PHPExcel $phpExcel PHPExcel object

Parameters

\PHPExcel $phpExcel

PHPExcel object

getFont()

getFont() 

Get Font

@return string

setFont()

setFont(  $fontName) 

Set font. Examples: 'arialunicid0-chinese-simplified' 'arialunicid0-chinese-traditional' 'arialunicid0-korean' 'arialunicid0-japanese'

@param string $fontName

Parameters

$fontName

getPaperSize()

getPaperSize() 

Get Paper Size

@return int

setPaperSize()

setPaperSize(  $pValue = \PHPExcel_Worksheet_PageSetup::PAPERSIZE_LETTER) : \PHPExcel_Writer_PDF

Set Paper Size

@param string $pValue Paper size

Parameters

$pValue

Returns

\PHPExcel_Writer_PDF

getOrientation()

getOrientation() 

Get Orientation

@return string

setOrientation()

setOrientation(  $pValue = \PHPExcel_Worksheet_PageSetup::ORIENTATION_DEFAULT) : \PHPExcel_Writer_PDF

Set Orientation

@param string $pValue Page orientation

Parameters

$pValue

Returns

\PHPExcel_Writer_PDF

getTempDir()

getTempDir() 

Get temporary storage directory

@return string

setTempDir()

setTempDir(  $pValue = '') 

Set temporary storage directory

@param string $pValue Temporary storage directory

Parameters

$pValue

Throws

\PHPExcel_Writer_Exception

when directory does not exist @return PHPExcel_Writer_PDF

save()

save(  $pFilename = NULL) 

Save PHPExcel to file

@param string $pFilename Name of the file to save as

Parameters

$pFilename

Throws

\PHPExcel_Writer_Exception

getSheetIndex()

getSheetIndex() : integer

Get sheet index

Returns

integer

setSheetIndex()

setSheetIndex(integer  $pValue) : \PHPExcel_Writer_HTML

Set sheet index

Parameters

integer $pValue

Sheet index

Returns

\PHPExcel_Writer_HTML

getGenerateSheetNavigationBlock()

getGenerateSheetNavigationBlock() : boolean

Get sheet index

Returns

boolean

setGenerateSheetNavigationBlock()

setGenerateSheetNavigationBlock(boolean  $pValue = true) : \PHPExcel_Writer_HTML

Set sheet index

Parameters

boolean $pValue

Flag indicating whether the sheet navigation block should be generated or not

Returns

\PHPExcel_Writer_HTML

writeAllSheets()

writeAllSheets() 

Write all sheets (resets sheetIndex to NULL)

generateHTMLHeader()

generateHTMLHeader(boolean  $pIncludeStyles = false) : string

Generate HTML header

Parameters

boolean $pIncludeStyles

Include styles?

Throws

\PHPExcel_Writer_Exception

Returns

string

generateSheetData()

generateSheetData() : string

Generate sheet data

Throws

\PHPExcel_Writer_Exception

Returns

string

generateNavigation()

generateNavigation() : string

Generate sheet tabs

Throws

\PHPExcel_Writer_Exception

Returns

string

generateStyles()

generateStyles(boolean  $generateSurroundingHTML = true) : string

Generate CSS styles

Parameters

boolean $generateSurroundingHTML

Generate surrounding HTML tags? (<style> and </style>)

Throws

\PHPExcel_Writer_Exception

Returns

string

buildCSS()

buildCSS(boolean  $generateSurroundingHTML = true) : array

Build CSS styles

Parameters

boolean $generateSurroundingHTML

Generate surrounding HTML style? (html { })

Throws

\PHPExcel_Writer_Exception

Returns

array

generateHTMLFooter()

generateHTMLFooter() 

Generate HTML footer

getImagesRoot()

getImagesRoot() : string

Get images root

Returns

string

setImagesRoot()

setImagesRoot(string  $pValue = '.') : \PHPExcel_Writer_HTML

Set images root

Parameters

string $pValue

Returns

\PHPExcel_Writer_HTML

getEmbedImages()

getEmbedImages() : boolean

Get embed images

Returns

boolean

setEmbedImages()

setEmbedImages(boolean  $pValue = '.') : \PHPExcel_Writer_HTML

Set embed images

Parameters

boolean $pValue

Returns

\PHPExcel_Writer_HTML

getUseInlineCss()

getUseInlineCss() : boolean

Get use inline CSS?

Returns

boolean

setUseInlineCss()

setUseInlineCss(boolean  $pValue = false) : \PHPExcel_Writer_HTML

Set use inline CSS?

Parameters

boolean $pValue

Returns

\PHPExcel_Writer_HTML

formatColor()

formatColor(string  $pValue, string  $pFormat) : string

Add color to formatted string as inline style

Parameters

string $pValue

Plain formatted value without color

string $pFormat

Format code

Returns

string

getIncludeCharts()

getIncludeCharts() : boolean

Write charts in workbook? If this is true, then the Writer will write definitions for any charts that exist in the PHPExcel object.

If false (the default) it will ignore any charts defined in the PHPExcel object.

Returns

boolean

setIncludeCharts()

setIncludeCharts(boolean  $pValue = FALSE) : \PHPExcel_Writer_IWriter

Set write charts in workbook Set to true, to advise the Writer to include any charts that exist in the PHPExcel object.

Set to false (the default) to ignore charts.

Parameters

boolean $pValue

Returns

\PHPExcel_Writer_IWriter

getPreCalculateFormulas()

getPreCalculateFormulas() : boolean

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. This is faster for saving in PHPExcel, but slower when opening the resulting file in MS Excel, because Excel has to recalculate the formulae itself

Returns

boolean

setPreCalculateFormulas()

setPreCalculateFormulas(boolean  $pValue = TRUE) : \PHPExcel_Writer_IWriter

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.

Parameters

boolean $pValue

Pre-Calculate Formulas?

Returns

\PHPExcel_Writer_IWriter

getUseDiskCaching()

getUseDiskCaching() : boolean

Get use disk caching where possible?

Returns

boolean

setUseDiskCaching()

setUseDiskCaching(boolean  $pValue = FALSE, string  $pDirectory = NULL) : \PHPExcel_Writer_Excel2007

Set use disk caching where possible?

Parameters

boolean $pValue
string $pDirectory

Disk caching directory

Throws

\PHPExcel_Writer_Exception

when directory does not exist

Returns

\PHPExcel_Writer_Excel2007

getDiskCachingDirectory()

getDiskCachingDirectory() : string

Get disk caching directory

Returns

string

prepareForSave()

prepareForSave(  $pFilename = NULL) 

Save PHPExcel to PDF file, pre-save

@param string $pFilename Name of the file to save as

Parameters

$pFilename

Throws

\PHPExcel_Writer_Exception

restoreStateAfterSave()

restoreStateAfterSave(  $fileHandle) 

Save PHPExcel to PDF file, post-save

@param resource $fileHandle

Parameters

$fileHandle

Throws

\PHPExcel_Writer_Exception

_mapVAlign()

_mapVAlign(string  $vAlign) : string

Map VAlign

Parameters

string $vAlign

Vertical alignment

Returns

string

_mapHAlign()

_mapHAlign(string  $hAlign) : string|false

Map HAlign

Parameters

string $hAlign

Horizontal alignment

Returns

string|false

_mapBorderStyle()

_mapBorderStyle(integer  $borderStyle) : string

Map border style

Parameters

integer $borderStyle

Sheet index

Returns

string

_extendRowsForChartsAndImages()

_extendRowsForChartsAndImages(\PHPExcel_Worksheet  $pSheet,   $row) 

Parameters

\PHPExcel_Worksheet $pSheet
$row

_writeImageInCell()

_writeImageInCell(\PHPExcel_Worksheet  $pSheet, string  $coordinates) : string

Generate image tag in cell

Parameters

\PHPExcel_Worksheet $pSheet

PHPExcel_Worksheet

string $coordinates

Cell coordinates

Throws

\PHPExcel_Writer_Exception

Returns

string

_writeChartInCell()

_writeChartInCell(\PHPExcel_Worksheet  $pSheet, string  $coordinates) : string

Generate chart tag in cell

Parameters

\PHPExcel_Worksheet $pSheet

PHPExcel_Worksheet

string $coordinates

Cell coordinates

Throws

\PHPExcel_Writer_Exception

Returns

string

_createCSSStyle()

_createCSSStyle(\PHPExcel_Style  $pStyle) : array

Create CSS style

Parameters

\PHPExcel_Style $pStyle

PHPExcel_Style

Returns

array

_createCSSStyleAlignment()

_createCSSStyleAlignment(\PHPExcel_Style_Alignment  $pStyle) : array

Create CSS style (PHPExcel_Style_Alignment)

Parameters

\PHPExcel_Style_Alignment $pStyle

PHPExcel_Style_Alignment

Returns

array

_createCSSStyleFont()

_createCSSStyleFont(\PHPExcel_Style_Font  $pStyle) : array

Create CSS style (PHPExcel_Style_Font)

Parameters

\PHPExcel_Style_Font $pStyle

PHPExcel_Style_Font

Returns

array

_createCSSStyleBorders()

_createCSSStyleBorders(\PHPExcel_Style_Borders  $pStyle) : array

Create CSS style (PHPExcel_Style_Borders)

Parameters

\PHPExcel_Style_Borders $pStyle

PHPExcel_Style_Borders

Returns

array

_createCSSStyleBorder()

_createCSSStyleBorder(\PHPExcel_Style_Border  $pStyle) : string

Create CSS style (PHPExcel_Style_Border)

Parameters

\PHPExcel_Style_Border $pStyle

PHPExcel_Style_Border

Returns

string

_createCSSStyleFill()

_createCSSStyleFill(\PHPExcel_Style_Fill  $pStyle) : array

Create CSS style (PHPExcel_Style_Fill)

Parameters

\PHPExcel_Style_Fill $pStyle

PHPExcel_Style_Fill

Returns

array

_generateTableHeader()

_generateTableHeader(\PHPExcel_Worksheet  $pSheet) : string

Generate table header

Parameters

\PHPExcel_Worksheet $pSheet

The worksheet for the table we are writing

Throws

\PHPExcel_Writer_Exception

Returns

string

_generateTableFooter()

_generateTableFooter() 

Generate table footer

Throws

\PHPExcel_Writer_Exception

_generateRow()

_generateRow(\PHPExcel_Worksheet  $pSheet, array  $pValues = null, integer  $pRow,   $cellType = 'td') : string

Generate row

Parameters

\PHPExcel_Worksheet $pSheet

PHPExcel_Worksheet

array $pValues

Array containing cells in a row

integer $pRow

Row number (0-based)

$cellType

Throws

\PHPExcel_Writer_Exception

Returns

string

_assembleCSS()

_assembleCSS(  $pValue = array()) : string

Takes array where of CSS properties / values and converts to CSS string

Parameters

$pValue

Returns

string

_calculateSpans()

_calculateSpans() 

Calculate information about HTML colspan and rowspan which is not always the same as Excel's

_setMargins()

_setMargins(\PHPExcel_Worksheet  $pSheet) 

Parameters

\PHPExcel_Worksheet $pSheet