multicell.htm 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  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>MultiCell</title>
  6. <link type="text/css" rel="stylesheet" href="../fpdf.css">
  7. </head>
  8. <body>
  9. <h1>MultiCell</h1>
  10. <code>MultiCell(<b>float</b> w, <b>float</b> h, <b>string</b> txt [, <b>mixed</b> border [, <b>string</b> align [, <b>boolean</b> fill]]])</code>
  11. <h2>Description</h2>
  12. This method allows printing text with line breaks. They can be automatic (as soon as the
  13. text reaches the right border of the cell) or explicit (via the \n character). As many cells
  14. as necessary are output, one below the other.
  15. <br>
  16. Text can be aligned, centered or justified. The cell block can be framed and the background
  17. painted.
  18. <h2>Parameters</h2>
  19. <dl class="param">
  20. <dt><code>w</code></dt>
  21. <dd>
  22. Width of cells. If <code>0</code>, they extend up to the right margin of the page.
  23. </dd>
  24. <dt><code>h</code></dt>
  25. <dd>
  26. Height of cells.
  27. </dd>
  28. <dt><code>txt</code></dt>
  29. <dd>
  30. String to print.
  31. </dd>
  32. <dt><code>border</code></dt>
  33. <dd>
  34. Indicates if borders must be drawn around the cell block. The value can be either a number:
  35. <ul>
  36. <li><code>0</code>: no border</li>
  37. <li><code>1</code>: frame</li>
  38. </ul>
  39. or a string containing some or all of the following characters (in any order):
  40. <ul>
  41. <li><code>L</code>: left</li>
  42. <li><code>T</code>: top</li>
  43. <li><code>R</code>: right</li>
  44. <li><code>B</code>: bottom</li>
  45. </ul>
  46. Default value: <code>0</code>.
  47. </dd>
  48. <dt><code>align</code></dt>
  49. <dd>
  50. Sets the text alignment. Possible values are:
  51. <ul>
  52. <li><code>L</code>: left alignment</li>
  53. <li><code>C</code>: center</li>
  54. <li><code>R</code>: right alignment</li>
  55. <li><code>J</code>: justification (default value)</li>
  56. </ul>
  57. </dd>
  58. <dt><code>fill</code></dt>
  59. <dd>
  60. Indicates if the cell background must be painted (<code>true</code>) or transparent (<code>false</code>).
  61. Default value: <code>false</code>.
  62. </dd>
  63. </dl>
  64. <h2>See also</h2>
  65. <a href="setfont.htm">SetFont()</a>,
  66. <a href="setdrawcolor.htm">SetDrawColor()</a>,
  67. <a href="setfillcolor.htm">SetFillColor()</a>,
  68. <a href="settextcolor.htm">SetTextColor()</a>,
  69. <a href="setlinewidth.htm">SetLineWidth()</a>,
  70. <a href="cell.htm">Cell()</a>,
  71. <a href="write.htm">Write()</a>,
  72. <a href="setautopagebreak.htm">SetAutoPageBreak()</a>.
  73. <hr style="margin-top:1.5em">
  74. <div style="text-align:center"><a href="index.htm">Index</a></div>
  75. </body>
  76. </html>