Link to embedded PDFs on an iPad

Hello there, I hope someone can help.
We are creating a project to be used on an iPad where we will display all of our PDFs and Presentations. Each Hype screen will have a series of thumbnails that when selected should open the relevant PDF or presentation outside of the Hype project but locally on the iPad.

I assume we simply drag the PDF into Hype which creates a thumbnail and also adds the PDF resource in the resources library. But what are the next steps? What would be best way to link to the resource so we can show the multipage PDF or presentation?

Thanks guys

This page might help you think of options: Displaying PDFs within your Tumult Hype Documents

Thanks Daniel, I did look a that page before I posted, but it seems to be focused on web uploading. Is there not a way to add the files to the iPad/Hype file so that it can be accessed locally? We maybe somewhere sowing the app where we don't have web access so ideally everything would be stored on the iPad in some way.

Since web browsers don't support displaying PDFs within themselves and require an interpreter (like PDF.js) it takes a little extra effort to get this working. For PDF.js, which seems like the best way to show a PDF on a webpage, it looks like it is possible to use it offline:

The path you would use is ${resourcesFolderName}/filename.pdf or you may need to hardcode it to something like index.hyperesources/filename.pdf if placed inside an HTML widget.

So once you have that working, you will likely want to setup a Kiosk situation where the iPad can download all files locally and display them without internet access. Here's a few tools for that: Displaying a Tumult Hype document in a Kiosk or as an app

If the PDFs are just a few pages, you may save yourself a lot of trouble and either export them to HTML or export them to a sequence of images that you create a slideshow with.

1 Like

Thanks Daniel, so is it not possible to set a clickable link to a thumbnail that opens a PDF document in Adobe (not online or offline)?

Did you try option 2 or 3 in the downloadable 'pdf-example' file on this page? Displaying PDFs within your Tumult Hype Documents Both options open in a new tab in Safari -- but if you want this all to run 'locally' then you would need to add some sort of Kiosk tool. Embedding multi-page pdfs in Hype or HTMK = tricky, but loading a Hype document which contains PDF files in a Kiosk shouldn't be too hard.

I had some success by replacing the PDF for my own PDF in the 'pdf-example' file and changing the code in the Widget but when I try to do the same to my own file I cant get it to work. For example the 'Automatically Optimize When Exporting' box is greyed out when I select the PDFs in my Hype file?

Hmm -- are you sure you're just selecting the PDFs? In my tests this works as expected:

Yes it's odd. I drag the PDF into hype. Reveal PDF in the Resource folder, so it is selected and it is still greyed out.

When I create a new doc and drag the PDF in the 'Automatically Optimize When Exporting' box is NOT greyed out. And only the PDF appears. In my original file it kind of puts it into a group and creates a Retina version of it. Is that the issue and how to stop it from doing that?

Can you send both files so I can see what might be going on? That's odd.... (Feel free to send me a private message if you'd prefer)

Thanks again Daniel,

I think I have sorted that issue by re importing the PDF into Hype.

I have set on Mouse Click to 'Go to URL' with the link ${resourcesFolderName}/PDF Name.pdf

This opens the PDF in the web browser, without using PDF.js

I have set the PDF to open 'Two-Up (Cover Page)' so that the PDF opens as spreads but this isn't respected when the PDF opens in the browser. Is there anything I can do to make this work?