addpage.htm 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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>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>
  12. Adds a new page to the document. If a page is already present, the Footer() method is called
  13. first to output the footer. Then the page is added, the current position set to the top-left
  14. corner according to the left and top margins, and Header() is called to display the header.
  15. <br>
  16. The font which was set before calling is automatically restored. There is no need to call
  17. SetFont() again if you want to continue with the same font. The same is true for colors and
  18. line width.
  19. <br>
  20. The origin of the coordinate system is at the top-left corner and increasing ordinates go
  21. downwards.
  22. <h2>Parameters</h2>
  23. <dl class="param">
  24. <dt><code>orientation</code></dt>
  25. <dd>
  26. Page 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>
  31. The default value is the one passed to the constructor.
  32. </dd>
  33. <dt><code>size</code></dt>
  34. <dd>
  35. Page 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>
  43. or an array containing the width and the height (expressed in user unit).<br>
  44. <br>
  45. The default value is the one passed to the constructor.
  46. </dd>
  47. <dt><code>rotation</code></dt>
  48. <dd>
  49. Angle by which to rotate the page. It must be a multiple of 90; positive values
  50. mean 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>