write.htm 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253
  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. <H2>Write</H2>
  10. <TT>Write(<B>float</B> h, <B>string</B> txt [, <B>mixed</B> link])</TT>
  11. <H4 CLASS='st'>Version</H4>
  12. 1.5
  13. <H4 CLASS='st'>Description</H4>
  14. This method prints text from the current position. When the right margin is reached (or the \n
  15. character is met) a line break occurs and text continues from the left margin. Upon method exit,
  16. the current position is left just at the end of the text.
  17. <BR>
  18. It is possible to put a link on the text.
  19. <H4 CLASS='st'>Parameters</H4>
  20. <TT><U>h</U></TT>
  21. <BLOCKQUOTE>
  22. Line height.
  23. </BLOCKQUOTE>
  24. <TT><U>txt</U></TT>
  25. <BLOCKQUOTE>
  26. String to print.
  27. </BLOCKQUOTE>
  28. <TT><U>link</U></TT>
  29. <BLOCKQUOTE>
  30. URL or identifier returned by AddLink().
  31. </BLOCKQUOTE>
  32. <H4 CLASS='st'>Example</H4>
  33. <TABLE WIDTH="100%" BGCOLOR="#E0E0E0"><TR><TD>
  34. <TT>
  35. //Begin with regular font<BR>
  36. $pdf-&gt;SetFont('Arial','',14);<BR>
  37. $pdf-&gt;Write(5,'Visit ');<BR>
  38. //Then put a blue underlined link<BR>
  39. $pdf-&gt;SetTextColor(0,0,255);<BR>
  40. $pdf-&gt;SetFont('','U');<BR>
  41. $pdf-&gt;Write(5,'www.fpdf.org','http://www.fpdf.org');
  42. </TT>
  43. </TD></TR></TABLE><BR>
  44. <H4 CLASS='st'>See also</H4>
  45. <A HREF="setfont.htm">SetFont()</A>,
  46. <A HREF="settextcolor.htm">SetTextColor()</A>,
  47. <A HREF="addlink.htm">AddLink()</A>,
  48. <A HREF="multicell.htm">MultiCell()</A>,
  49. <A HREF="setautopagebreak.htm">SetAutoPageBreak()</A>.
  50. <HR STYLE="margin-top:1.2em">
  51. <DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
  52. </BODY>
  53. </HTML>