1

I am very new to Drupal sorry if my question is very basic or common. I am creating a web site using Drupal 7 and I am using Tack da files module to tack files which are available for download.

My problem is that I have many PDF files in my site available for download, and the sites shows a popup window to download some of those PDF files. I do not want that popup window, but the site showing the PDF.

Why does it offers the user to download the files, instead of showing them?

0

So It sounds like your problem is more with inconsistent of how links being opens. A simple solution to this make links opening consistent from theme layer. In your themes folder inside

template.php

add a theme hook

function theme_file_link($variables) {
//Some Code from https://api.drupal.org/api/drupal/modules!file!file.module/function/theme_file_link/7.x
if($mimetype == 'application/pdf') 
$options['attributes']['target'] = '_blank'; // Force to open PDF link in new tab
return '<span class="file">' . $icon . ' ' . l($link_text, $url, $options) . '</span>';
}

I hope always opening PDF file in new tab will solve this inconsistency.

Let me know if that helps.

| improve this answer | |
0

By listening to it , it sounds that your browser does not have PDF plugin installed , that is why it downloads file instead of opening.

The same thing can happen to lot of your user, solution to that is Mozilla Project pdf.js

Drupal also have a module for this PDF Module, check that out and see if that helps.

| improve this answer | |
  • Dear sir Thank you very much for your reply, i have checked my browser it is enabled with PDF plugin, let me explain problem once again.There are download links with href of PDF file when you click on link at that time for some links browser shows PDFs and for some links it shows download popup window.for example i have two pages white-papers and presentations all the PDFs on white-papers opens in browser and all the links on presentations are getting downloaded. I hope this explains my problem Thank you once gain – shailendra Jul 4 '16 at 10:49

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.