\PHPExcel_Writer_PDF_tcPDF

PHPExcel_Writer_PDF_tcPDF

@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 : int

Paper size (Over-ride)

Type

int

$_paperSizes

$_paperSizes : array

Paper Sizes xRef List

Type

array

$_phpExcel

$_phpExcel : \PHPExcel

PHPExcel object

Type

PHPExcel

$_isPdf

$_isPdf : bool

Is the current writer creating PDF?

Type

bool

$_includeCharts

$_includeCharts : bool

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

bool

$_preCalculateFormulas

$_preCalculateFormulas : bool

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

bool

$_useDiskCaching

$_useDiskCaching : bool

Use disk caching where possible?

Type

bool

$_diskCachingDirectory

$_diskCachingDirectory : string

Disk caching directory

Type

string

$_saveArrayReturnType

$_saveArrayReturnType : string

Temporary storage for Save Array Return type

Type

string

$_sheetIndex

$_sheetIndex : int

Sheet index to write

Type

int

$_imagesRoot

$_imagesRoot : string

Images root

Type

string

$_embedImages

$_embedImages : bool

embed images, or link to images

Type

bool

$_useInlineCss

$_useInlineCss : bool

Use inline CSS?

Type

bool

$_cssStyles

$_cssStyles : array

Array of CSS styles

Type

array

$_columnWidths

$_columnWidths : array

Array of column widths in points

Type

array

$_spansAreCalculated

$_spansAreCalculated : bool

Flag whether spans have been calculated

Type

bool

$_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 : bool

Generate the Navigation block

Type

bool

Methods

__construct()

__construct(\PHPExcel  $phpExcel) : mixed

Create a new PHPExcel_Writer_PDF

@param PHPExcel $phpExcel PHPExcel object

Parameters

\PHPExcel $phpExcel

PHPExcel object

Returns

mixed —

getFont()

getFont() : mixed

Get Font

@return string

Returns

mixed —

setFont()

setFont(mixed  $fontName) : mixed

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

@param string $fontName

Parameters

mixed $fontName

Returns

mixed —

getPaperSize()

getPaperSize() : mixed

Get Paper Size

@return int

Returns

mixed —

setPaperSize()

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

Set Paper Size

@param string $pValue Paper size

Parameters

mixed $pValue

Returns

\PHPExcel_Writer_PDF —

getOrientation()

getOrientation() : mixed

Get Orientation

@return string

Returns

mixed —

setOrientation()

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

Set Orientation

@param string $pValue Page orientation

Parameters

mixed $pValue

Returns

\PHPExcel_Writer_PDF —

getTempDir()

getTempDir() : mixed

Get temporary storage directory

@return string

Returns

mixed —

setTempDir()

setTempDir(mixed  $pValue = '') : mixed

Set temporary storage directory

@param string $pValue Temporary storage directory

Parameters

mixed $pValue

Throws

\PHPExcel_Writer_Exception

when directory does not exist @return PHPExcel_Writer_PDF

Returns

mixed —

save()

save(mixed  $pFilename = NULL) : mixed

Save PHPExcel to file

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

Parameters

mixed $pFilename

Throws

\PHPExcel_Writer_Exception

Returns

mixed —

getSheetIndex()

getSheetIndex() : int

Get sheet index

Returns

int —

setSheetIndex()

setSheetIndex(int  $pValue) : \PHPExcel_Writer_HTML

Set sheet index

Parameters

int $pValue

Sheet index

Returns

\PHPExcel_Writer_HTML —

getGenerateSheetNavigationBlock()

getGenerateSheetNavigationBlock() : bool

Get sheet index

Returns

bool —

setGenerateSheetNavigationBlock()

setGenerateSheetNavigationBlock(bool  $pValue = true) : \PHPExcel_Writer_HTML

Set sheet index

Parameters

bool $pValue

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

Returns

\PHPExcel_Writer_HTML —

writeAllSheets()

writeAllSheets() : mixed

Write all sheets (resets sheetIndex to NULL)

Returns

mixed —

generateHTMLHeader()

generateHTMLHeader(bool  $pIncludeStyles = false) : string

Generate HTML header

Parameters

bool $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(bool  $generateSurroundingHTML = true) : string

Generate CSS styles

Parameters

bool $generateSurroundingHTML

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

Throws

\PHPExcel_Writer_Exception

Returns

string —

buildCSS()

buildCSS(bool  $generateSurroundingHTML = true) : array

Build CSS styles

Parameters

bool $generateSurroundingHTML

Generate surrounding HTML style? (html { })

Throws

\PHPExcel_Writer_Exception

Returns

array —

generateHTMLFooter()

generateHTMLFooter() : mixed

Generate HTML footer

Returns

mixed —

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() : bool

Get embed images

Returns

bool —

setEmbedImages()

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

Set embed images

Parameters

bool $pValue

Returns

\PHPExcel_Writer_HTML —

getUseInlineCss()

getUseInlineCss() : bool

Get use inline CSS?

Returns

bool —

setUseInlineCss()

setUseInlineCss(bool  $pValue = false) : \PHPExcel_Writer_HTML

Set use inline CSS?

Parameters

bool $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() : bool

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

bool —

setIncludeCharts()

setIncludeCharts(bool  $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

bool $pValue

Returns

\PHPExcel_Writer_IWriter —

getPreCalculateFormulas()

getPreCalculateFormulas() : bool

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

bool —

setPreCalculateFormulas()

setPreCalculateFormulas(bool  $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

bool $pValue

Pre-Calculate Formulas?

Returns

\PHPExcel_Writer_IWriter —

getUseDiskCaching()

getUseDiskCaching() : bool

Get use disk caching where possible?

Returns

bool —

setUseDiskCaching()

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

Set use disk caching where possible?

Parameters

bool $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(mixed  $pFilename = NULL) : mixed

Save PHPExcel to PDF file, pre-save

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

Parameters

mixed $pFilename

Throws

\PHPExcel_Writer_Exception

Returns

mixed —

restoreStateAfterSave()

restoreStateAfterSave(mixed  $fileHandle) : mixed

Save PHPExcel to PDF file, post-save

@param resource $fileHandle

Parameters

mixed $fileHandle

Throws

\PHPExcel_Writer_Exception

Returns

mixed —

_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(int  $borderStyle) : string

Map border style

Parameters

int $borderStyle

Sheet index

Returns

string —

_extendRowsForChartsAndImages()

_extendRowsForChartsAndImages(\PHPExcel_Worksheet  $pSheet, mixed  $row) : mixed

Parameters

\PHPExcel_Worksheet $pSheet
mixed $row

Returns

mixed —

_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() : mixed

Generate table footer

Throws

\PHPExcel_Writer_Exception

Returns

mixed —

_generateRow()

_generateRow(\PHPExcel_Worksheet  $pSheet, array  $pValues = null, int  $pRow) : string

Generate row

Parameters

\PHPExcel_Worksheet $pSheet

PHPExcel_Worksheet

array $pValues

Array containing cells in a row

int $pRow

Row number (0-based)

Throws

\PHPExcel_Writer_Exception

Returns

string —

_assembleCSS()

_assembleCSS(mixed  $pValue = array()) : string

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

Parameters

mixed $pValue

Returns

string —

_calculateSpans()

_calculateSpans() : mixed

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

Returns

mixed —

_setMargins()

_setMargins(\PHPExcel_Worksheet  $pSheet) : mixed

Parameters

\PHPExcel_Worksheet $pSheet

Returns

mixed —