Pdfview is a very useful addition to Drupal. However, it doesn't function the way one would expect. I've tried it with both Firefox 1.5 and IE 6 with Acrobat 6 installed.

When I click on the "view as pdf" link I receive a dialog asking if I want to save or open the file. This is sometimes useful as you may want to save (download) the file or print (open) the file, but I'd prefer it to default to print. If I select open, pdfview opens the file in Acrobat. I think it would be more normal if the file opened in another browser window (or tab for tabbed browsers) via the Acrobat browser plugin. This is what usually happens in browsers when you click on a link to a pdf file.

Using Firefox (in Options - Download) I've specified that pdf files should automatically open using the Acrobat plugin, but pdfview still opens them in Acrobat.

Is there some relatively easy way to change this behavior?

Comments

Egon Bianchet’s picture

Version: 4.6.x-1.x-dev » master
Component: User interface » Code

I could make it configurable with a setting ...

darren oh’s picture

I've had problems with PDF files no matter whether they are generated or uploaded. When Drupal file access is set to private, the file downloads instead of opening in the browser.

darren oh’s picture

Status: Active » Needs review

All that's required is to remove the Content-Disposition line. Then the user's browser settings will be respected. It's line 131 in pdfview.module. I didn't think it was worth making a patch file for this.

Egon Bianchet’s picture

Status: Needs review » Fixed

I had a look at it and discovered that sending headers is useless because the TCPDF Output method already does that ..., so I removed that two lines.

The download now defaults to inline: if somebody thinks the previous behavior is better I'll make a setting ...

Anonymous’s picture

Status: Fixed » Closed (fixed)