RE: [PHP] PDF pain

From: Date: Fri, 19 Jul 2002 14:02:03 +0000
Subject: RE: [PHP] PDF pain
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-108502@lists.php.net to get a copy of this message
try the pdfclock example @ http://www.php.net/manual/en/ref.pdf.php see if that works. =C= * * Cal Evans * The Virtual CIO * http://www.calevans.com * -----Original Message----- From: Michael Hall [mailto:olc@ninti.com] Sent: Friday, July 19, 2002 8:55 AM To: php-general@lists.php.net Subject: [PHP] PDF pain I THINK I have installed pdflib and compiled it into PHP 4.2.1 OK. At least, configure/make/make install all went OK and it is trying to work. I copied the sample 'Hello World in PDF' script out of Programming PHP (p 234) into a file named pdftest.pdf When I try to access http://localhost/pdftest.pdf, Konqueror tries to open a PDF file but then spits the dummy saying: "Could not open file blahblah.pdf which has type application/x-zerosize. KGhostview can only open Postscript and Portable Document Format files" So it looks like a header problem or something? This raises a few other questions: - Should the PHP script be called pdftest.php or pdftest.pdf? - Does httpd.conf need an AddType directive for pdf files? I've tried a few variations on "AddType application/x-pdf .pdf" etc - Should .pdf be added to the php AddType directive? eg. "AddType application/x-httpd-php .php .htm .pdf Basically, I'm confused. Anyone been there done that? TIA Michael -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

« previous php.general (#108502) next »