Documentation

DocumentLayout
in package

\PhpOffice\PhpPresentation\DocumentLayout.

Table of Contents

Constants

LAYOUT_35MM  = '35mm'
LAYOUT_A3  = 'A3'
LAYOUT_A4  = 'A4'
LAYOUT_B4ISO  = 'B4ISO'
LAYOUT_B5ISO  = 'B5ISO'
LAYOUT_BANNER  = 'banner'
LAYOUT_CUSTOM  = ''
LAYOUT_LETTER  = 'letter'
LAYOUT_OVERHEAD  = 'overhead'
LAYOUT_SCREEN_16X10  = 'screen16x10'
LAYOUT_SCREEN_16X9  = 'screen16x9'
LAYOUT_SCREEN_4X3  = 'screen4x3'
UNIT_CENTIMETER  = 'cm'
UNIT_EMU  = 'emu'
UNIT_INCH  = 'in'
UNIT_MILLIMETER  = 'mm'
UNIT_PIXEL  = 'px'
UNIT_POINT  = 'pt'

Properties

$dimension  : array<string, array<string, int>>
Dimension types.
$dimensionX  : float
Layout X dimension.
$dimensionY  : float
Layout Y dimension.
$layout  : string
Layout name.

Methods

__construct()  : mixed
Create a new \PhpOffice\PhpPresentation\DocumentLayout.
getCX()  : float
Get Document Layout cx.
getCY()  : float
Get Document Layout cy.
getDocumentLayout()  : string
Get Document Layout.
setCX()  : self
Get Document Layout cx.
setCY()  : self
Get Document Layout cy.
setDocumentLayout()  : self
Set Document Layout.
convertUnit()  : float
Convert EMUs to differents units.

Constants

LAYOUT_SCREEN_16X10

public mixed LAYOUT_SCREEN_16X10 = 'screen16x10'

LAYOUT_SCREEN_16X9

public mixed LAYOUT_SCREEN_16X9 = 'screen16x9'

Properties

$dimension

Dimension types.

private array<string, array<string, int>> $dimension = [self::LAYOUT_SCREEN_4X3 => ['cx' => 9144000, 'cy' => 6858000], self::LAYOUT_SCREEN_16X10 => ['cx' => 9144000, 'cy' => 5715000], self::LAYOUT_SCREEN_16X9 => ['cx' => 9144000, 'cy' => 5143500], self::LAYOUT_35MM => ['cx' => 10287000, 'cy' => 6858000], self::LAYOUT_A3 => ['cx' => 15120000, 'cy' => 10692000], self::LAYOUT_A4 => ['cx' => 10692000, 'cy' => 7560000], self::LAYOUT_B4ISO => ['cx' => 10826750, 'cy' => 8120063], self::LAYOUT_B5ISO => ['cx' => 7169150, 'cy' => 5376863], self::LAYOUT_BANNER => ['cx' => 7315200, 'cy' => 914400], self::LAYOUT_LETTER => ['cx' => 9144000, 'cy' => 6858000], self::LAYOUT_OVERHEAD => ['cx' => 9144000, 'cy' => 6858000]]

1 px = 9525 EMU @ 96dpi (which is seems to be the default) Absolute distances are specified in English Metric Units (EMUs), occasionally referred to as A units; there are 360000 EMUs per centimeter, 914400 EMUs per inch, 12700 EMUs per point.

Methods

__construct()

Create a new \PhpOffice\PhpPresentation\DocumentLayout.

public __construct() : mixed

getCX()

Get Document Layout cx.

public getCX([string $unit = self::UNIT_EMU ]) : float
Parameters
$unit : string = self::UNIT_EMU
Return values
float

getCY()

Get Document Layout cy.

public getCY([string $unit = self::UNIT_EMU ]) : float
Parameters
$unit : string = self::UNIT_EMU
Return values
float

getDocumentLayout()

Get Document Layout.

public getDocumentLayout() : string
Return values
string

setCX()

Get Document Layout cx.

public setCX(float $value[, string $unit = self::UNIT_EMU ]) : self
Parameters
$value : float
$unit : string = self::UNIT_EMU
Return values
self

setCY()

Get Document Layout cy.

public setCY(float $value[, string $unit = self::UNIT_EMU ]) : self
Parameters
$value : float
$unit : string = self::UNIT_EMU
Return values
self

setDocumentLayout()

Set Document Layout.

public setDocumentLayout([array<string, int>|string $pValue = self::LAYOUT_SCREEN_4X3 ][, bool $isLandscape = true ]) : self
Parameters
$pValue : array<string, int>|string = self::LAYOUT_SCREEN_4X3
$isLandscape : bool = true
Return values
self

convertUnit()

Convert EMUs to differents units.

protected convertUnit(float $value, string $fromUnit, string $toUnit) : float
Parameters
$value : float
$fromUnit : string
$toUnit : string
Return values
float

        
On this page

Search results