Php PDF Problems

They have: 5,633 posts

Joined: Jan 1970

I am storing my pdf's in a mysql database. When i want to display the pdf by clicking on a link i have to click twice on 'Open this file from its current location'. It first tells me that i have chosen to download the file from the php page ie. download.php and then i click again and it now gives me the name pdf name ie. test.pdf.
I have no problems with displaying images.

I was looking at my phpinfo.php page and my HTTP Headers Information Section had the following information

Do i have to edit my mime.types file and add application/pdf?

Mark Hensler's picture

He has: 4,048 posts

Joined: Aug 2000

hmm, I've never played with PDF using PHP. You may have to print your "application/pdf" header, prior to sending the pdf binary data.

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.