bakerframework / baker

The HTML5 ebook framework to publish interactive books & magazines on iPad & iPhone using simply open web standards
http://bakerframework.com
370 stars 101 forks source link

How to get back in the book from the opened PDF document #543

Closed GennadyK closed 8 years ago

GennadyK commented 8 years ago

Hi guys, Thanks a lot for this project. We started to evaluate BF today from the content point of view and so far everything works well. Got only this problem: we have link in the book to the PDF reference. Once it's opened there is only way to get back to the shelf by double-tap, but there is no way to return to the HTML page in the book, that the PDF was called from. Could you please advise of what could be done to make it work the best possible way? E.g. Adobe DPS displays the bar at the top with word "Done" to tap back to the book. TIA, Gennady

nicholasmartin commented 8 years ago

I think this will sort your problem for you: https://github.com/Simbul/baker/wiki/Managing-links-and-urls

:)

GennadyK commented 8 years ago

Thank you Nicholas, I read it before and don't understand how this could help. I only see that local PDF/html replaces current page's content. Could you please explain how this could help? What we need is something like in this answer, please: http://stackoverflow.com/questions/17520348/open-pdf-in-the-phonegap-app-that-is-made-in-html-and-css#17520422

nicholasmartin commented 8 years ago

Hi again, let;s say you are using the following link to your PDF file: <a href="http://www.yourdomain.com/book.pdf">Click here</a>

This will by default reload the magazine page that the user is on.

Instead you add "?referrer=baker" to the URL and it will now open in a modal window with a back button to return to the magazine page: <a href="http://www.yourdomain.com/book.pdf?referrer=baker">Click here</a>

Hope this helps.

GennadyK commented 8 years ago

Thanks so much Nicholas, First I thought it works only for external PDFs, but it worked for local link as well. Maybe it needs to be added to the doc. Appreciate it! Kind regards, G.

nicholasmartin commented 8 years ago

You're welcome, thanks for the feedback!