How to make PDFs open in browser window (Safari, IE)

antiorario - November 16, 2009 - 15:34
Project:FileField
Version:6.x-3.2
Component:Miscellaneous
Category:support request
Priority:normal
Assigned:Unassigned
Status:active
Description

I suppose this question has been asked somewhere, but I can't seem to find a solution.

In the websites I manage, PDF files uploaded via FileField are downloaded instead of displayed in the browser window. Of course I'm talking about the browsers—like Safari and IE—that support in-browser PDF display. The Upload module allows this, and it seems strange that FileField doesn't.

Any suggestions?

Thanks.

#1

quicksketch - November 16, 2009 - 16:19

Are you using private or public downloads (set at admin/settings/file-system)? There's the opposite (force a file to download) instructions at http://drupal.org/node/417866 for public downloads. For private downloads you need to set a hidden variable "filefield_inline_types" by putting this in your settings.php:

<?php
$conf
['filefield_inline_types'] = array('^text/', '^image/', 'flash$', 'application/pdf');
?>

#2

antiorario - December 2, 2009 - 16:02

Sorry for the delay, but for some reason I'm not receiving e-mail notifications of issue updates.

Thanks for the input. I'm using private downloads, and I'll definitely try that and see what happens.

 
 

Drupal is a registered trademark of Dries Buytaert.