TCPDF::__construct( $orientation = 'P', $unit = 'mm', $format = 'A4', $unicode = true, $encoding = 'UTF-8', $diskcache = false, $pdfa = false )
This is the class constructor.
Description Description
It allows to set up the page format, the orientation and the measure unit used in all the methods (except for the font sizes).
IMPORTANT: Please note that this method sets the mb_internal_encoding to ASCII, so if you are using the mbstring module functions with TCPDF you need to correctly set/unset the mb_internal_encoding when needed.
See also See also
- getPageSizeFromFormat(),: setPageFormat()
Parameters Parameters
- $orientation
-
(Optional) (string) page orientation. Possible values are (case insensitive):<ul><li>P or Portrait (default)</li><li>L or Landscape</li><li>'' (empty string) for automatic orientation</li></ul>
Default value: 'P'
- $unit
-
(Optional) (string) User measure unit. Possible values are:<ul><li>pt: point</li><li>mm: millimeter (default)</li><li>cm: centimeter</li><li>in: inch</li></ul><br />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: 'mm'
- $format
-
(Optional) (mixed) The format used for pages. It can be either: one of the string values specified at getPageSizeFromFormat() or an array of parameters specified at setPageFormat().
Default value: 'A4'
- $unicode
-
(Optional) (boolean) TRUE means that the input text is unicode (default = true)
Default value: true
- $encoding
-
(Optional) (string) Charset encoding (used only when converting back html entities); default is UTF-8.
Default value: 'UTF-8'
- $diskcache
-
(Optional) (boolean) DEPRECATED FEATURE
Default value: false
- $pdfa
-
(Optional) (integer) If not false, set the document to PDF/A mode and the good version (1 or 3).
Default value: false
Source Source
File: includes/lib/tcpdf/tcpdf.php