tags:

views:

49

answers:

1

Hello,

I would like some guidance on the best way of launching PDFs from a browser.

I have a JSP that takes some parameters and based on this downloads a PDF from my Documentum server. The files are stored on my local file system. I then provide the user with a bunch of links to the PDFs so they can click on them to launch the PDF.

Is there a best practice method of doing this?

Thanks.

+2  A: 

There is nothing special to do: a link is sufficient. But you can add target="_new" if you want the browser to open the pdf in a new window. Just make sure that the content-type returned for the pdf is application/pdf.

Maurice Perry
And if possible put a PDF icon next to the link. Quite a few folks don't glance at the file extension. And its extremely important when the URL is not clearly saying it. +1
Adeel Ansari