output.htm 1.8 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  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>Output</title>
  6. <link type="text/css" rel="stylesheet" href="../fpdf.css">
  7. </head>
  8. <body>
  9. <h1>Output</h1>
  10. <code><b>string</b> Output([<b>string</b> dest [, <b>string</b> name [, <b>boolean</b> isUTF8]]])</code>
  11. <h2>Description</h2>
  12. Send the document to a given destination: browser, file or string. In the case of a browser, the
  13. PDF viewer may be used or a download may be forced.
  14. <br>
  15. The method first calls Close() if necessary to terminate the document.
  16. <h2>Parameters</h2>
  17. <dl class="param">
  18. <dt><code>dest</code></dt>
  19. <dd>
  20. Destination where to send the document. It can be one of the following:
  21. <ul>
  22. <li><code>I</code>: send the file inline to the browser. The PDF viewer is used if available.</li>
  23. <li><code>D</code>: send to the browser and force a file download with the name given by <code>name</code>.</li>
  24. <li><code>F</code>: save to a local file with the name given by <code>name</code> (may include a path).</li>
  25. <li><code>S</code>: return the document as a string.</li>
  26. </ul>
  27. The default value is <code>I</code>.
  28. </dd>
  29. <dt><code>name</code></dt>
  30. <dd>
  31. The name of the file. It is ignored in case of destination <code>S</code>.<br>
  32. The default value is <code>doc.pdf</code>.
  33. </dd>
  34. <dt><code>isUTF8</code></dt>
  35. <dd>
  36. Indicates if <code>name</code> is encoded in ISO-8859-1 (<code>false</code>) or UTF-8 (<code>true</code>).
  37. Only used for destinations <code>I</code> and <code>D</code>.<br>
  38. The default value is <code>false</code>.
  39. </dd>
  40. </dl>
  41. <h2>See also</h2>
  42. <a href="close.htm">Close</a>
  43. <hr style="margin-top:1.5em">
  44. <div style="text-align:center"><a href="index.htm">Index</a></div>
  45. </body>
  46. </html>