A lightbox—which opens on top of the site (or app) that you are currently viewing—is a great way to load external content, but remain on the same page once the content is closed.
As a designer, a lightbox is a useful tool to keep readers in your “experience” and not force them to find their way back to your page.
Technically speaking, a lightbox loads external content into an <iframe>.
in5 (InDesign to HTML5) lets you add lightboxes with a single checkbox—no coding or hassle required (and no thinking about iframes)!
The Problem: iOS, Lightboxes, and Multipage PDFs
A handful of in5 customers found that when loading multipage PDFs into a lightbox on iOS devices (iPads and iPhones), you can’t navigate to the second page.
This happens in part because iOS has a PDF viewer built into the web browser.
Normally, the built-in PDF view is quite handy, but when it’s loaded into an iframe, you don’t have access to the page navigation.
Google Drive to the Rescue!
Fortunately, if you
- upload your PDF to Google Drive and
- grab a shareable link (details below)
The Google online PDF viewer will let you navigate through all the pages (even in a lightbox).
Simply replace the hyperlink to your PDF with the Google Drive shareable URL.
Other sharing services that can view PDFs online would probably work too (e.g., Dropbox), but you may want to factor in how much user interface (UI) and branding of the service itself adds around the document.
Details on How to Get the Shareable Link
- While previewing your PDF in Google Drive, go to the fly out menu in the top-right of the viewing window.
- Then grab only the URL portion from the Embed dialog (leave the HTML code).
Google Drive will keep the UI minimal if you add &embedded=true to the end of the URL.
You can also view files through the Google Docs viewer, even if they are external and not hosted on Google Docs, using the URL below:
Get updates from Ajar Productions
Sign up today and get the InDesign Split Text premium extension for free!