help files
Z505 | PasWiki | FUQ | Search | Main Docs | API Guide



Notes

To output other mime types other than HTML (such as generating JPG, Excel, PDF, PNG, or any others on the fly), you can override web headers by using the SetWebHeader or the PutWebHeader functions.

If you are outputting binary data such as a PDF or JPG/PNG file, you can make use of the WebBufferOut function after you have called SetWebHeader.

It is important to remember that the SetWebHeader function must be called before any output calls, such as webwrite, webbufferout, etc. The web headers are always sent before browser output, so calling setwebheader after you have already output text to the web browser will not have any effect (unless gzip compression/buffering is on, but it is recommended that you get into the habit of setting the headers first so that your programs function without gzip too).

See example






lufdoc, Powtils, fpc, freepascal, delphi, kylix, c/c++, mysql, cgi web framework docs, Z505