PDF reader?

If you have a pdf on your website that visitors would like to read, is there any way of the website somehow ‘seeing’ if they have a pdf reader on their pc please ? and if they don’t have a reader on their pc, to then put a message up saying, something like, to read this pdf, you’ll need to . . . . .

I’ve never heard of any way to detect that. Given that the vast majority of websites simply say “If you don’t have Acrobat Reader installed, click here to download it” (and the rest don’t say owt at all), I would be surprised if there was a better way of doing it.

Probably the nearest you can do sensibly without getting to complex is provide a link to the PDF and make sure it has the correct MIME. For example:

<a href=“example.pdf” type=“application/pdf” title=“Link to Example PDF document”>[PDF document]</a>

Then obviously provide a link as to where you can download the PDF Reader. The browser will then be armed with enough information to search for an appropriate plugin if it doesn’t already have such a reader.

Thanks Robert, is there a preferred place on the net to d/load from ?

Well, usually Adobe is synonymous with PDF although there are loads of other Readers. The usual link is as follows: http://www.adobe.com/products/acrobat/readstep.html
[URL=“http://www.adobe.com/products/acrobat/readstep2.html”]

I think this should theoretically work, but at least Internet Explorer 6 does not want to play ball:

if(!strstr($_SERVER["HTTP_ACCEPT"], "application/pdf")) {
 echo "Download Adobe Reader to view this document.";
}
else {
}

I provide an HTML version that works with the print stylesheet. Then people can do whatever they want: they’re at your website so we know they can deal with HTML : )