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>Write</title>
|
---|
6 | <link type="text/css" rel="stylesheet" href="../fpdf.css">
|
---|
7 | </head>
|
---|
8 | <body>
|
---|
9 | <h1>Write</h1>
|
---|
10 | <code>Write(<b>float</b> h, <b>string</b> txt [, <b>mixed</b> link])</code>
|
---|
11 | <h2>Description</h2>
|
---|
12 | This method prints text from the current position. When the right margin is reached (or the \n
|
---|
13 | character is met) a line break occurs and text continues from the left margin. Upon method exit,
|
---|
14 | the current position is left just at the end of the text.
|
---|
15 | <br>
|
---|
16 | It is possible to put a link on the text.
|
---|
17 | <h2>Parameters</h2>
|
---|
18 | <dl class="param">
|
---|
19 | <dt><code>h</code></dt>
|
---|
20 | <dd>
|
---|
21 | Line height.
|
---|
22 | </dd>
|
---|
23 | <dt><code>txt</code></dt>
|
---|
24 | <dd>
|
---|
25 | String to print.
|
---|
26 | </dd>
|
---|
27 | <dt><code>link</code></dt>
|
---|
28 | <dd>
|
---|
29 | URL or identifier returned by AddLink().
|
---|
30 | </dd>
|
---|
31 | </dl>
|
---|
32 | <h2>Example</h2>
|
---|
33 | <div class="doc-source">
|
---|
34 | <pre><code>//Begin with regular font
|
---|
35 | $pdf->SetFont('Arial','',14);
|
---|
36 | $pdf->Write(5,'Visit ');
|
---|
37 | //Then put a blue underlined link
|
---|
38 | $pdf->SetTextColor(0,0,255);
|
---|
39 | $pdf->SetFont('','U');
|
---|
40 | $pdf->Write(5,'www.fpdf.org','http://www.fpdf.org');</code></pre>
|
---|
41 | </div>
|
---|
42 | <h2>See also</h2>
|
---|
43 | <a href="setfont.htm">SetFont()</a>,
|
---|
44 | <a href="settextcolor.htm">SetTextColor()</a>,
|
---|
45 | <a href="addlink.htm">AddLink()</a>,
|
---|
46 | <a href="multicell.htm">MultiCell()</a>,
|
---|
47 | <a href="setautopagebreak.htm">SetAutoPageBreak()</a>.
|
---|
48 | <hr style="margin-top:1.5em">
|
---|
49 | <div style="text-align:center"><a href="index.htm">Index</a></div>
|
---|
50 | </body>
|
---|
51 | </html>
|
---|