It seems that you have two problems:
If you want to have a regular HTML link to your pdf file, you need to write
the link as:
print "<a href='pdf/".$pdf[$i]."'><img src='images/icon_mini_pdf.gif'
border='0'></a><i>$pdf[$i]</i>";
This should open Acrobat and download your pdf file if the browser has been
configured for.
Second, if you want PHP to download the file, you need to send it with the
correct MIME using the Header function.
Alain
On Thu, Aug 16, 2001 at 10:17:39AM +0200, Andrew.Martin wrote:
> I'm creating a Content Management system in which the user will have to
> attach a pdf document to an article. This is no problem, I copy the document
> to a specific pdf folder and store the document name in the DB to use on the
> front end.
>
> On the front end I loop through all documents that are online and print the
> title, display pdf icon, print pdf name and description and link to the
> document (in the specific pdf folder)
>
> <a href='pdf/$pdf[$i]'><img src='images/icon_mini_pdf.gif'
> border='0'></a><i>$pdf[$i]</i>
>
> where $pdf[$i] is the pdf name (for each $i)
>
> I have tried this with a number of pdf documents, with certain documents I
> get parser errors! (Could there be problems with the document itself?
>
> On the majority I get the standard windows popup message asking to me to
> open online or save locally. If I open online nothing happens! Acrobat
> reader opens and then closes straight away! If I go to save, it
> automatically puts the extension html on the file name! If i change this to
> pdf I can save it ok and I can open it without problems.
>
> Are there certain options in the php.ini or Apache.conf file I need to
> enable to view pdf files in php? I have seen the extension
> ;extension=php_pdf.dll commented out.
>
> Anyone any ideas?
>
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]