Jump to content


 


Register a free account to unlock additional features at BleepingComputer.com
Welcome to BleepingComputer, a free community where people like yourself come together to discuss and learn how to use their computers. Using the site is easy and fun. As a guest, you can browse and view the various discussions in the forums, but can not create a new topic or reply to an existing one unless you are logged in. Other benefits of registering an account are subscribing to topics and forums, creating a blog, and having no ads shown anywhere on the site.


Click here to Register a free account now! or read our Welcome Guide to learn how to use this site.

Photo

Unable to open pdfs in Chrome


  • Please log in to reply
9 replies to this topic

#1 scruffbag

scruffbag

  • Members
  • 73 posts
  • OFFLINE
  •  
  • Location:UK
  • Local time:07:09 PM

Posted 19 January 2014 - 01:33 PM

Hi,

 

In the past I have had no problem with opening pdfs in Chrome. The Chrome reader has always been disabled and Adobe Reader enabled. Recently pdfs wouldn't open, so I tried using the built in Chrome Reader. I get a box open saying loading but nothing ever happens.

 

I have tried uninstalling and reinstalling Adobe Reader, with the result that the Chrome Reader was enabled and the newly installed Adobe Reader Disabled. PDFs opened with the Chrome reader, all good. Disabled Chrome Reader, enabled Adobe Reader, nothing opened! Switched back again, nothing opened. Repeated the uninstalling/reinstalling, worked fine using Chrome Reader, thought I'd just leave it like that. On next attempt to open a pdf, in chrome, it wouldn't work!! Anyone have any ideas?

 

OS is windows 7, OS, all browsers and Adobe Reader up to date. Pdfs open fine in Firefox, IE9 and Opera. Admittedly Safari is a bit iffy but works fine in Safari on an iPad.

 

Hope someone has a magic wand, I know others who have a problem opening pdfs in Chrome too, but don't know if their problems are the same.

 

This is the link to one of the pdfs concerned. http://www.ridgebacks.org.uk/Forms/forms_2014/2014%20March%20Open%20Show/March%20%2714%20Schedule.pdf

 

Thanks

Derek Smith



BC AdBot (Login to Remove)

 


#2 HashX

HashX

  • Members
  • 106 posts
  • OFFLINE
  •  
  • Gender:Male
  • Location:United Kingdom
  • Local time:08:09 PM

Posted 19 January 2014 - 02:49 PM

Source: wix.com
 
Google Chrome has integrated Flash directly with the browser instead of using the Flash version you may have installed from the Adobe Flash website.
With the recent release of Google Chrome version 29 and later, Google made a change and instead of using Adobe's Flash, they now use something new called PepperFlash.  
 
With Chrome version 29 and PepperFlash it may not be possible to download files (Doc/PDF)
To download these files, follow the steps below to disable the new PepperFlash.
 
Try the following steps:
1.    Open the Chrome Plugins page by typing this URL into the address bar: chrome://plugins
2.    Find the "[+] Details" button in the upper right to show the details of each installed plugin and click this button.
3.    Find the Flash Plugin Section in the list of Plugins. There may be two or more files in this section.
4.    In the Flash section there should be two or three different versions of Flash listed. If the Flash section only has one Flash file listed, download and install the Adobe Flash Plugin for Non-Internet Explorer browsers. http://get.adobe.com/flashplayer/
5.    The first Plugin listed in the Flash section is the PepperFlash implementation. You can tell that the first one is PepperFlash by looking for "PepperFlash" in the Location string. See yellow highlight below.
6.    Find the "Disable" link and click that link.
7.    Now close all open Chrome windows and tabs and restart Chrome, you should be able to download the files again.

Edited by HashX, 19 January 2014 - 02:50 PM.

I don't always use Internet Explorer, but when I do, it's to download a different browser.

 


#3 scruffbag

scruffbag
  • Topic Starter

  • Members
  • 73 posts
  • OFFLINE
  •  
  • Location:UK
  • Local time:07:09 PM

Posted 19 January 2014 - 03:37 PM

Thanks for that HashX, sadly it made no difference, still can't get the pdf files to open with either Adobe Reader or the built in Chrome Reader.



#4 Guest_philsmith_dot_com_*

Guest_philsmith_dot_com_*

  • Guests
  • OFFLINE
  •  

Posted 20 January 2014 - 01:16 PM

Your headers are not correct. You have "Content-Type: adobe acrobat" which will cause confusion, not being a MIME type. Change that to "Content-Type: application/pdf" and you'll have a much better outcome.

 

The other thing to do would be to add a header "Content-Disposition: attachment; filename=yourfilename.pdf". This will force a download, and once the file is downloaded your OS should pick up the pdf extension and load it into Reader. If you want it to be displayed with a browser's built-in reader, set the header to "Content-Disposition: inline" and be sure to set the Content-Type to application/pdf.



#5 scruffbag

scruffbag
  • Topic Starter

  • Members
  • 73 posts
  • OFFLINE
  •  
  • Location:UK

Posted 20 January 2014 - 03:57 PM

Thanks for your observations philsmith_dot_com, but I'm afraid you have confused me. Where would I expect to see the headers you refer to, and how do I amend them?

 

Thanks again



#6 Guest_philsmith_dot_com_*

Guest_philsmith_dot_com_*

  • Guests
  • OFFLINE
  •  

Posted 20 January 2014 - 04:30 PM

You're already amending them somehow. Unfortunately, your server is IIS, and I have no experience (thankfully) with it at all. Perhaps somebody else can help you fix it. If this were apache, I'd have the answer for you: put "AddType application/pdf .pdf" in your .htaccess file. There must be a way to do that with IIS, but I don't know it.

 

To clarify, this is a dump of the http transaction as seen from my computer:

 

GET /Forms/forms_2014/2014%20March%20Open%20Show/March%20%2714%20Schedule.pdf HTTP/1.1
Host: www.ridgebacks.org.uk
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://www.bleepingcomputer.com/forums/t/521337/unable-to-open-pdfs-in-chrome/
Connection: keep-alive

[snip]

 

HTTP/1.1 200 OK
Content-Type: adobe acrobat
Last-Modified: Sun, 19 Jan 2014 17:54:33 GMT
Accept-Ranges: bytes
ETag: "7ef174823f15cf1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Mon, 20 Jan 2014 18:03:21 GMT
Content-Length: 859932

 

[snip]

 

So you can see the Content-Type is not kosher. Good luck!

 

-Phil



#7 Guest_philsmith_dot_com_*

Guest_philsmith_dot_com_*

  • Guests
  • OFFLINE
  •  

Posted 20 January 2014 - 05:03 PM

 

GET /Forms/forms_2014/2014%20March%20Open%20Show/March%20%2714%20Schedule.pdf HTTP/1.1
Host: www.ridgebacks.org.uk
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.9; rv:26.0) Gecko/20100101 Firefox/26.0
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
Accept-Language: en-US,en;q=0.5
Accept-Encoding: gzip, deflate
DNT: 1
Referer: http://www.bleepingcomputer.com/forums/t/521337/unable-to-open-pdfs-in-chrome/
Connection: keep-alive

[snip]

 

HTTP/1.1 200 OK
Content-Type: adobe acrobat
Last-Modified: Sun, 19 Jan 2014 17:54:33 GMT
Accept-Ranges: bytes
ETag: "7ef174823f15cf1:0"
Server: Microsoft-IIS/7.5
X-Powered-By: ASP.NET
Date: Mon, 20 Jan 2014 18:03:21 GMT
Content-Length: 859932

 

[snip]

Hi Derek, that may not have been clear to you at all. Let's start at the beginning. My computer opens a connection to your server, and sends an HTTP request:

 

GET /Forms/forms_2014/2014%20March%20Open%20Show/March%20%2714%20Schedule.pdf HTTP/1.1

 

Those other things that are send are called "headers". Host: is a header.

 

Then your server sends a reply:

 

HTTP/1.1 200 OK

 

Which simply means everything's hunky-dory. Then it sends some headers. The first one, Content-Type, tells my browser what kind of file it is. If it said image/jpeg, my browser would try to render it. There is a specification called MIME which was first intended for email but applied to http, and "adobe acrobat" is not in it. At least last time I looked. But here is the header your server sent:

 

Content-Type: adobe acrobat

 

Since there is no Content-Disposition header and it's an unrecognized MIME type, it' up to the browser to decide what to do. I do wonder what Chrome is doing. But it's not a wonder whatever it's doing is wrong; it's working on bad information.

 

-Phil



#8 scruffbag

scruffbag
  • Topic Starter

  • Members
  • 73 posts
  • OFFLINE
  •  
  • Location:UK
  • Local time:07:09 PM

Posted 20 January 2014 - 07:38 PM

 Thanks Phil. I kind of understand what you are saying. Have just discovered that right clicking on the pdf links and selecting "open in new window" works fine. I guess there must be something in the browser settings because I have the links set up to open in a new window, but in all browsers they open in a new tab including chrome, where of course nothing is rendered, in chrome only that is. 

 

Too tired now, off to bed, I'll take another look tomorrow.

 

Thanks again

Derek Smith



#9 scruffbag

scruffbag
  • Topic Starter

  • Members
  • 73 posts
  • OFFLINE
  •  
  • Location:UK

Posted 21 January 2014 - 04:42 AM

Just to follow up, there appears to be no setting in chrome to force links to open in a new window, as opposed to a new tab!

 

I think the only thing I can do is to advise on the web sites that they are best viewed in IE, Firefox, Opera or for Apple products Safari. Although on my iphone the Chrome browser opens the pdf links perfectly well!



#10 Guest_philsmith_dot_com_*

Guest_philsmith_dot_com_*

  • Guests
  • OFFLINE
  •  

Posted 21 January 2014 - 11:21 AM

I have a similar problem. I have a pdf with a submission; that is, the pdf sends itself as POST data to a server. Except on Chrome, where the embedded reader sends an FDF, not a PDF. FDF is an abbreviated PDF where just the form data is sent, it's up to me to put the data in the form. So rather than do that, I added a header "Content-Disposition: attachment; filename=whatever.pdf" if the browser is Chrome. It works on version 32, but not 21. IOW, older versions of Chrome ignore my instructions and open it instead of downloading it. What really bugs me is that I discovered this because my client uses Chrome v. 21.






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users