Skip to main content
Deaf_Guy
Inspiring
November 19, 2014
Answered

How to make PDFs responsive and work on mobile devices

  • November 19, 2014
  • 2 replies
  • 57662 views

Hi - here is the website I'm currently converting to a responsive design:

http://www.darrp.noaa.gov/northeast/hudson/admin.html

As you'll see the above is not responsive and further, you'll notice a long list of PDF documents that will also have to be moved over to the new responsive site, and those docs need to open on mobile devices.  On my Galaxy Android phone, and using the phone's default browser (no Chrome for mobile or anything like that) when I click on a link to a PDF in the above page, Android will download the PDF to the phone and then open up in a Kindle reader (which I happen to have installed a while back on the phone).

This obviously will not work for the new website - the PDFs would have to open in some type of reader like they do on a desktop browser.

So does anyone have any ideas on what I need to do to get this to work?  Something in Dreamweaver? Some kind of third-party or code I can add that will make the PDF open and be readable on phones and tablets?  PS - I do realize that the UX will not be great since many of the PDFs are scans of old documents with small type and so forth.  The key is to just get this to work on the new site.

Any help is appreciated.  Thanks - Deaf Guy

This topic has been closed for replies.
Correct answer BenPleysier

Have a look if this is what you want PDF.js viewer.

If so, grab the whole thing here mozilla/pdf.js · GitHub

2 replies

Legend
November 19, 2014

I think pdfs are as responsive as large amounts of  tabular data - they arent.

I dont think there is anything you can do because it is a fixed size - sure you can reduce the size in the browser window but its unreadable. Therfore to read it you would need to pinch zoom or have some fancy js like Ben has suggested but responsive pdfs  - they don't exist.

Deaf_Guy
Deaf_GuyAuthor
Inspiring
November 19, 2014

I agree with you 100%.  The only alternative is grab each PDF, convert each page to a JPG, and post the JPG as a picture inside of a website.  Make it as wide as possible and then let the responsive shrink it accordingly.  Again, it will be hard to read and you can imagine the enormous amount of work it would take to do this to hundreds and hundreds of PDFs :-(

Jon Fritz
Community Expert
Community Expert
November 19, 2014

How PDFs are viewed is at the mercy of the viewers system, always has been.

If you're going to provide PDFs to mobile users (I honestly wouldn't in most cases), it really is up to the viewer as to how the file is viewed. If they've installed some form of PDF viewing software it will open there, if they lack PDF support, nothing will happen when the link is clicked but in most cases the file will open as a relatively clunky, hard to navigate PDF. There's no way to force them to view it a certain way. Even on desktops, PDFs can be set by the user to open in browser (for those browsers with PDF supporting plug-ins), in Acrobat itself (if it's installed), or download without opening.

Nothing you do to the code will change that localized setting.

In my opinion, if your PDF info is truly so important that even small mobile device users need access to it, your best option would be to take the info from the PDF and turn it into a responsive .html file so it's just another page on your site.

BenPleysier
Community Expert
BenPleysierCommunity ExpertCorrect answer
Community Expert
November 19, 2014

Have a look if this is what you want PDF.js viewer.

If so, grab the whole thing here mozilla/pdf.js · GitHub

Wappler is the DMXzone-made Dreamweaver replacement and includes the best of their powerful extensions, as well as much more!
Deaf_Guy
Deaf_GuyAuthor
Inspiring
November 19, 2014

Ben - thanks so much for sending this.  I loaded the sample one you posted on my Android using the base browser that it comes with (not Chrome).  It looks like this:

So it looks like that doesn't work with that browser, but I do appreciate you sending it to me.  Thanks.