1. Adam Dutko
  2. Portfolio


Portfolio / oncall / www / php / fpdf / doc / fpdf.htm

<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link type="text/css" rel="stylesheet" href="../fpdf.css">
<code>FPDF([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> size]]])</code>
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).
<dl class="param">
Default page orientation. Possible values are (case insensitive):
<li><code>P</code> or <code>Portrait</code></li>
<li><code>L</code> or <code>Landscape</code></li>
Default value is <code>P</code>.
User unit. Possible values are:
<li><code>pt</code>: point</li>
<li><code>mm</code>: millimeter</li>
<li><code>cm</code>: centimeter</li>
<li><code>in</code>: inch</li>
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 <code>mm</code>.
The size used for pages. It can be either one of the following values (case insensitive):
or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
Default value is <code>A4</code>.
Example with a custom 100x150 mm page size:
<div class="doc-source">
<pre><code>$pdf = new FPDF('P','mm',array(100,150));</code></pre>
<hr style="margin-top:1.5em">
<div style="text-align:center"><a href="index.htm">Index</a></div>