-
-
Notifications
You must be signed in to change notification settings - Fork 2
Fpdf::__constructor
Fery Wardiyanto edited this page Feb 10, 2015
·
1 revision
FPDF([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])
This is the class constructor. It allows to set up the page size, the orientation and the unit of measure used in all methods (except for font sizes).
- `orientation`
-
Default page orientation. Possible values are (case insensitive):
-
P
orPortrait
-
L
orLandscape
Default value is
P
. -
- `unit`
-
User unit. Possible values are:
-
pt
: point -
mm
: millimeter -
cm
: centimeter -
in
: inch
A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This is a very common unit in typography; font sizes are expressed in that unit.
Default value is
mm
. -
- `size`
-
The size used for pages. It can be either one of the following values (case insensitive):
A3
A4
A5
Letter
Legal
or an array containing the width and the height (expressed in the unit given by
unit
). Default value isA4
.
Example with a custom 100x150 mm page size:
$pdf = new FPDF('P','mm',array(100,150));