blob: f75bc83c10ce41e2a099974c427ad21a25ab5de0 [file] [log] [blame]
Copybara botbe50d492023-11-30 00:16:42 +01001<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
2<html>
3<head>
4<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
5<title>AddPage</title>
6<link type="text/css" rel="stylesheet" href="../fpdf.css">
7</head>
8<body>
9<h1>AddPage</h1>
10<code>AddPage([<b>string</b> orientation [, <b>mixed</b> size [, <b>int</b> rotation]]])</code>
11<h2>Description</h2>
12Adds a new page to the document. If a page is already present, the Footer() method is called
13first to output the footer. Then the page is added, the current position set to the top-left
14corner according to the left and top margins, and Header() is called to display the header.
15<br>
16The font which was set before calling is automatically restored. There is no need to call
17SetFont() again if you want to continue with the same font. The same is true for colors and
18line width.
19<br>
20The origin of the coordinate system is at the top-left corner and increasing ordinates go
21downwards.
22<h2>Parameters</h2>
23<dl class="param">
24<dt><code>orientation</code></dt>
25<dd>
26Page orientation. Possible values are (case insensitive):
27<ul>
28<li><code>P</code> or <code>Portrait</code></li>
29<li><code>L</code> or <code>Landscape</code></li>
30</ul>
31The default value is the one passed to the constructor.
32</dd>
33<dt><code>size</code></dt>
34<dd>
35Page size. It can be either one of the following values (case insensitive):
36<ul>
37<li><code>A3</code></li>
38<li><code>A4</code></li>
39<li><code>A5</code></li>
40<li><code>Letter</code></li>
41<li><code>Legal</code></li>
42</ul>
43or an array containing the width and the height (expressed in user unit).<br>
44<br>
45The default value is the one passed to the constructor.
46</dd>
47<dt><code>rotation</code></dt>
48<dd>
49Angle by which to rotate the page. It must be a multiple of 90; positive values
50mean clockwise rotation. The default value is <code>0</code>.
51</dd>
52</dl>
53<h2>See also</h2>
54<a href="__construct.htm">__construct</a>,
55<a href="header.htm">Header</a>,
56<a href="footer.htm">Footer</a>,
57<a href="setmargins.htm">SetMargins</a>
58<hr style="margin-top:1.5em">
59<div style="text-align:center"><a href="index.htm">Index</a></div>
60</body>
61</html>