> I had looked it up in the manual, but I am not sure of what to put into
> the area /* ... output pdf file ... */
> Any help is appreciated....
> Todd
> ++++
> If you want the user to be prompted to save the data you are sending,
> such as a generated PDF file, you can use the Content-Disposition header
> to supply a recommended filename and force the browser to display the
> save dialog.
> <? php header("Content-type: application/pdf");
>    header("Content-Disposition: attachment; filename=downloaded.pdf");
>    /* ... output pdf file ... */
> ++++

This is where you put whatever chunk of code you use to create the
file that you wish the user to download. If this is a PDF file on
disk, you can do something as simple as readfile("filename.pdf")..
or if you are generating it yourself.. then, again, you'll probably
use readfile("whatever.pdf"), since (though I have never used them)
I am pretty sure the PDF libs don't have an output function, so you
have to write to disk.

Example 1 on this page (
shows EXACTLY what you are trying to do with one small change, make
the word "inline" read as "attachment" so it'll force the user to
download, as opposed to displaying in the browser.

Daniel J. Lashua

PHP General Mailing List (
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to