Joomlatools Support Center

How to open pdf files within the browser

My client has made some 'manual links' to pdf files, when you click on those they automatcially open within the browser.

However when they click on any 'docman' pdf files, they have to save them first...

Link to see the way they want it to work:

From here, click on programs on the left

To do this, they just put a 'pdf' file in the folder using media manager, instead of docman, because they wanted a menu item to go directly here...

Link using docman, they want the links to open: 


Posted 8 years ago by Johan Janssens Staff

Hi Laura, there are three ways to change the download behavior of DOCman.

1. Adding pdf to the list of viewable document.

Go to administrator > components > DOCman > configuration and select the frontend tab. In general settings change 'extensions for viewing' to html|htm|txt|jpg|jpeg|gif|png|pdf

This change will add a 'view' button in the document list for on the frontend for PDF documents. It will open up a popup and show the document inline.

Take note though that this requires the browser to be able to show the document inline. This is a supported feature of Chrome and IE but not of Firefox.

In FireFox you can install this extension which is an official mozilla plugin to add this behavior - it's still in beta thus why it's not included in there core product. The pdf viewer is scheduled to be included in FireFox 15.

For more info also see  :

2. Using a 'Linked Document'.

DOCman allows you to link to a url instead of to a file. To do this, go to the document edit page and below the editor on the document tab select '-> Linked Document

This way DOCman will link to the file instead of forcing it to be downloaded. As a result the file will be open up in the browser if the browser can display it.

3. Modifying DOCman

You can modify DOCman to not make it force a download. To do so change line 272 in /components/com_docman/docman.php from

download($doc, false);


download($doc, true);

Take not though that if you update DOCman this change will be overridden again and needs to be re-applied.

There are 12 more comments in this ticket.
Subscribe or login to join the discussion!

Laura Gordon

System Information