Welcome to the GoFuckYourself.com - Adult Webmaster Forum forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact us.

Post New Thread Reply

Register GFY Rules Calendar
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >
Discuss what's fucking going on, and which programs are best and worst. One-time "program" announcements from "established" webmasters are allowed.

 
Thread Tools
Old 08-01-2004, 03:52 PM   #1
KobyBoy
Confirmed User
 
Join Date: Jul 2003
Location: Purgatory
Posts: 201
Displaying PDFs

I've got a peculiar problem. On one of my sites users have an option to look at PDF documents. I have a PHP file that does a "Content-type: application/pdf" before sending any HTML to the browser and then connects to the database and reads the PDF file from there (as you can tell I store all the PDFs in the database). For some reason when I request a PDF file from IE I actually get the binary data of the PDF displayed in the browser. When I use FireFox the Acrobat Reader Plug-In kicks in and the PDF document gets displayed correctly inside the Acrobat Reader Plug-In. Any idea on how to fix this issue so it will work correctly with IE ?
KobyBoy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2004, 04:31 PM   #2
LadyMischief
Orgasms N Such!
 
LadyMischief's Avatar
 
Industry Role:
Join Date: Sep 2002
Location: Oakville, Ontario
Posts: 18,135
It's an adobe file. Acrobat reader.
__________________

ICQ 3522039
Content Manager - orgasm.com
[email protected]
LadyMischief is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2004, 04:35 PM   #3
freeadultcontent
Confirmed User
 
Join Date: Oct 2002
Location: "evitcepsrep ruoy egnahc"
Posts: 9,976
I.E. kicks adobe acrobat in for me just fine. I would check your file associations.
freeadultcontent is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2004, 04:50 PM   #4
woj
<&(©¿©)&>
 
woj's Avatar
 
Industry Role:
Join Date: Jul 2002
Location: Chicago
Posts: 47,882
Quote:
Originally posted by KobyBoy
I've got a peculiar problem. On one of my sites users have an option to look at PDF documents. I have a PHP file that does a "Content-type: application/pdf" before sending any HTML to the browser and then connects to the database and reads the PDF file from there (as you can tell I store all the PDFs in the database). For some reason when I request a PDF file from IE I actually get the binary data of the PDF displayed in the browser. When I use FireFox the Acrobat Reader Plug-In kicks in and the PDF document gets displayed correctly inside the Acrobat Reader Plug-In. Any idea on how to fix this issue so it will work correctly with IE ?
It should work the way just described... Your IE settings may be messed up, or IE cached the old header, so maybe try clearing the cache, and restarting IE?
__________________
Custom Software Development, email: woj#at#wojfun#.#com to discuss details or skype: wojl2000 or gchat: wojfun or telegram: wojl2000
Affiliate program tools: Hosted Galleries Manager Banner Manager Video Manager
Wordpress Affiliate Plugin Pic/Movie of the Day Fansign Generator Zip Manager
woj is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-01-2004, 05:47 PM   #5
KobyBoy
Confirmed User
 
Join Date: Jul 2003
Location: Purgatory
Posts: 201
Quote:
It should work the way just described... Your IE settings may be messed up, or IE cached the old header, so maybe try clearing the cache, and restarting IE?
That's what I've thought. But I've checked it from 10 different machines with the same results; FireFox/Mozilla works fine while IE displays the raw data. Very weird...
KobyBoy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-02-2004, 12:58 AM   #6
rich06
Registered User
 
rich06's Avatar
 
Industry Role:
Join Date: May 2004
Posts: 20
IE is a bit broken with this stuff sometimes - it doesn't always believe/accept the mime type your script sends and thinks it can work it out itself hence the garbage...

what http headers are you sending? here's some that I've used in the past to send generated PDF content to a browser ...

header('Content-type: application/pdf');
header('Content-Dishahahahahahahahahaha inline; filename=my.pdf');
header('Content-Length: '.strlen($pdf_content));
header('Cache-Control: must-revalidate, post-check=0, pre-check=0');

hth
rich
__________________
Email: [email protected]
rich06 is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Old 08-02-2004, 05:28 AM   #7
KobyBoy
Confirmed User
 
Join Date: Jul 2003
Location: Purgatory
Posts: 201
Quote:
IE is a bit broken with this stuff sometimes - it doesn't always believe/accept the mime type your script sends and thinks it can work it out itself hence the garbage...
I've only sent

header('Content-type: application/pdf');

which is sufficient for Mozilla. I'll try to send the rest of the header code that you've suggested and see what happens.

-Koby
KobyBoy is offline   Share thread on Digg Share thread on Twitter Share thread on Reddit Share thread on Facebook Reply With Quote
Post New Thread Reply
Go Back   GoFuckYourself.com - Adult Webmaster Forum > >

Bookmarks



Advertising inquiries - marketing at gfy dot com

Contact Admin - Advertise - GFY Rules - Top

©2000-, AI Media Network Inc



Powered by vBulletin
Copyright © 2000- Jelsoft Enterprises Limited.