16

I have a link to a pdf file on my website. The pdf opens without any issues in the built-in pdf viewer on Firefox or iOS.

I get an error when I try to open the pdf by clicking the link in Firefox on Android. After clicking the link the Adobe Reader app opens and tries to download the pdf for viewing. Then I get an error and the pdf doesn't open. The error inside of Adobe Reader just says

Error. The file could not be downloaded. Please save the file to your local storage and then try to open it.

How can I troubleshoot this? I tried removing spaces from the file name, using absolute urls in the links, but none of that worked. I also tried creating a pdf using a different program, in case the issue was in the pdf itself, and that didn't help. I also tried typing in the link directly into the browser url and same thing happens.

At this point I don't know how to troubleshoot it without getting some kind of debug information. I'm using Apache on the server.

3 Answers3

12

At one time in the past, you have picked Adobe Reader as default when it comes to downloading PDF-Docs. Unfortunately, AR doesn't support that option.

To change it back, Type about:config into the address bar of the browser. Search for browser.download.preferred.application/pdf. Underneath it should say "Adobe Acrobat". Reset this option.

Next time you download a PDF, Firefox will ask you how you want to open the PDF. Pick anything but AR.

theduck
  • 2,589
  • 13
  • 17
  • 23
jules
  • 121
  • 1
  • 3
0

PDF files created by some non-Adobe products aren't structurally correct sometimes. Adobe Reader and Acrobat products try their best to open even such PDF files but they do differ in terms of the kind of such pdf files they are able to open.

The problem is actually in the PDF file which you are trying to download. It might have some HTML code which is not formatted properly and hence the PDF viewer is not working as expected.

One workaround for this is to download the PDF file in your computer and pass the file in your Android device by other means and then opening the pdf file with the PDF viewer in the Android instead of opening it in Firefox or other browsers where you are having the problem.

Another way of fixing this is to format your PDF file using LaTex or some other tools so that it maintains the proper structure.

I am sharing a link which might have more information on this. You can see some people had a similar problem here as well.

Reaz Murshed
  • 23,691
  • 13
  • 78
  • 98
  • Thanks for the suggestion, but I don't think that its a pdf file problem. After you suggested I tested it by copying a pdf from a website that I verified I was able to open correctly, but it stopped working once transferred to my server. –  Jul 28 '19 at 18:48
  • Does your server make any modifications to the pdf while saving it? – Reaz Murshed Jul 28 '19 at 18:50
  • 1
    Not that I am aware of. One of your links explained a bit more how the handoff from Firefox to Adobe Reader works; the only thing it passes to Reader is the url. I'm thinking that maybe I have my SSL settings configured in a way that Adobe can't handle, but that is just another guess. –  Jul 28 '19 at 18:52
  • Yes, that can be the case as well. I will investigate further for other reasons and will get back to you if I find anything. – Reaz Murshed Jul 28 '19 at 18:53
-1

It could be a security related issue. If the download link is not https enabled or the certificate you provide is self-signed (or somehow not valid, aka exipred) it could prevent the Adobe app to load it directly from the url. Try to copy the file on (say) Amazon S3 and download it from andorid (which is https by default with a valid cerificate) and see if it works

Andrea Binda
  • 160
  • 5