output.htm 1.9 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. <H2>Output</H2>
  10. <TT><B>string</B> Output([<B>string</B> name [, <B>string</B> dest]])</TT>
  11. <H4 CLASS='st'>Version</H4>
  12. 1.0
  13. <H4 CLASS='st'>Description</H4>
  14. Send the document to a given destination: string, local file or browser. In the last case, the
  15. plug-in may be used (if present) or a download ("Save as" dialog box) may be forced.
  16. <BR>
  17. The method first calls Close() if necessary to terminate the document.
  18. <H4 CLASS='st'>Parameters</H4>
  19. <TT><U>name</U></TT>
  20. <BLOCKQUOTE>
  21. The name of the file. If not given, the document will be sent to the browser
  22. (destination <TT>I</TT>) with the name <TT>doc.pdf</TT>.
  23. </BLOCKQUOTE>
  24. <TT><U>dest</U></TT>
  25. <BLOCKQUOTE>
  26. Destination where to send the document. It can take one of the following values:
  27. <UL>
  28. <LI><TT>I</TT>: send the file inline to the browser. The plug-in is used if available.
  29. The name given by <TT>name</TT> is used when one selects the "Save as" option on the
  30. link generating the PDF.
  31. <LI><TT>D</TT>: send to the browser and force a file download with the name given by
  32. <TT>name</TT>.
  33. <LI><TT>F</TT>: save to a local file with the name given by <TT>name</TT>.
  34. <LI><TT>S</TT>: return the document as a string. <TT>name</TT> is ignored.
  35. </UL>
  36. If the parameter is not specified but a name is given, destination is <TT>F</TT>. If no
  37. parameter is specified at all, destination is <TT>I</TT>.<BR>
  38. <BR>
  39. Note: for compatibility with previous versions, a boolean value is also accepted
  40. (<TT>false</TT> for <TT>F</TT> and <TT>true</TT> for <TT>D</TT>).
  41. </BLOCKQUOTE>
  42. <H4 CLASS='st'>See also</H4>
  43. <A HREF="close.htm">Close()</A>.
  44. <HR STYLE="margin-top:1.2em">
  45. <DIV ALIGN="CENTER"><A HREF="index.htm">Index</A></DIV>
  46. </BODY>
  47. </HTML>