Before resorting to the extention (if at all), the web browser uses the Content-Type field to determine what is the data being sent by the web server. It should simply be a matter of setting the content type to "application/pdf". I've never done it for PDFs before, but I've have scripts with the .cgi extention output images of various type (PNG, JPG, GIF) without any problem when I set Content-Type properly.