1 | <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
|
---|
2 | <html>
|
---|
3 | <head>
|
---|
4 | <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
|
---|
5 | <title>FPDF</title>
|
---|
6 | <link type="text/css" rel="stylesheet" href="../fpdf.css">
|
---|
7 | </head>
|
---|
8 | <body>
|
---|
9 | <h1>FPDF</h1>
|
---|
10 | <code>FPDF([<b>string</b> orientation [, <b>string</b> unit [, <b>mixed</b> format]]])</code>
|
---|
11 | <h2>Description</h2>
|
---|
12 | This is the class constructor. It allows to set up the page format, the orientation and the
|
---|
13 | unit of measure used in all methods (except for font sizes).
|
---|
14 | <h2>Parameters</h2>
|
---|
15 | <dl class="param">
|
---|
16 | <dt><code>orientation</code></dt>
|
---|
17 | <dd>
|
---|
18 | Default page orientation. Possible values are (case insensitive):
|
---|
19 | <ul>
|
---|
20 | <li><code>P</code> or <code>Portrait</code></li>
|
---|
21 | <li><code>L</code> or <code>Landscape</code></li>
|
---|
22 | </ul>
|
---|
23 | Default value is <code>P</code>.
|
---|
24 | </dd>
|
---|
25 | <dt><code>unit</code></dt>
|
---|
26 | <dd>
|
---|
27 | User unit. Possible values are:
|
---|
28 | <ul>
|
---|
29 | <li><code>pt</code>: point</li>
|
---|
30 | <li><code>mm</code>: millimeter</li>
|
---|
31 | <li><code>cm</code>: centimeter</li>
|
---|
32 | <li><code>in</code>: inch</li>
|
---|
33 | </ul>
|
---|
34 | A point equals 1/72 of inch, that is to say about 0.35 mm (an inch being 2.54 cm). This
|
---|
35 | is a very common unit in typography; font sizes are expressed in that unit.
|
---|
36 | <br>
|
---|
37 | <br>
|
---|
38 | Default value is <code>mm</code>.
|
---|
39 | </dd>
|
---|
40 | <dt><code>format</code></dt>
|
---|
41 | <dd>
|
---|
42 | The format used for pages. It can be either one of the following values (case insensitive):
|
---|
43 | <ul>
|
---|
44 | <li><code>A3</code></li>
|
---|
45 | <li><code>A4</code></li>
|
---|
46 | <li><code>A5</code></li>
|
---|
47 | <li><code>Letter</code></li>
|
---|
48 | <li><code>Legal</code></li>
|
---|
49 | </ul>
|
---|
50 | or an array containing the width and the height (expressed in the unit given by <code>unit</code>).<br>
|
---|
51 | <br>
|
---|
52 | Default value is <code>A4</code>.
|
---|
53 | </dd>
|
---|
54 | </dl>
|
---|
55 | <h2>Example</h2>
|
---|
56 | Example with a custom 100x150 mm page format:
|
---|
57 | <div class="doc-source">
|
---|
58 | <pre><code>$pdf = new FPDF('P', 'mm', array(100,150));</code></pre>
|
---|
59 | </div>
|
---|
60 | <hr style="margin-top:1.5em">
|
---|
61 | <div style="text-align:center"><a href="index.htm">Index</a></div>
|
---|
62 | </body>
|
---|
63 | </html>
|
---|