\PhpOffice\PhpSpreadsheet\WriterPdf

Summary

Methods
Properties
Constants
__construct()
getFont()
setFont()
getPaperSize()
setPaperSize()
getOrientation()
setOrientation()
getTempDir()
setTempDir()
No public properties found
No constants found
prepareForSave()
restoreStateAfterSave()
$tempDir
$font
$orientation
$paperSize
$paperSizes
N/A
No private methods found
No private properties found
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

Methods

__construct()

__construct(\PhpOffice\PhpSpreadsheet\Spreadsheet  $spreadsheet) 

Create a new PDF Writer instance.

Parameters

\PhpOffice\PhpSpreadsheet\Spreadsheet $spreadsheet

Spreadsheet object

getFont()

getFont() : string

Get Font.

Returns

string

setFont()

setFont(string  $fontName) : $this

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

Parameters

string $fontName

Returns

$this

getPaperSize()

getPaperSize() : integer

Get Paper Size.

Returns

integer

setPaperSize()

setPaperSize(string  $pValue) : self

Set Paper Size.

Parameters

string $pValue

Paper size see PageSetup::PAPERSIZE_*

Returns

self

getOrientation()

getOrientation() : string

Get Orientation.

Returns

string

setOrientation()

setOrientation(string  $pValue) : self

Set Orientation.

Parameters

string $pValue

Page orientation see PageSetup::ORIENTATION_*

Returns

self

getTempDir()

getTempDir() : string

Get temporary storage directory.

Returns

string

setTempDir()

setTempDir(string  $pValue) : self

Set temporary storage directory.

Parameters

string $pValue

Temporary storage directory

Returns

self

prepareForSave()

prepareForSave(string  $pFilename) : resource

Save Spreadsheet to PDF file, pre-save.

Parameters

string $pFilename

Name of the file to save as

Returns

resource

restoreStateAfterSave()

restoreStateAfterSave() 

Save PhpSpreadsheet to PDF file, post-save.