PDF Export from Hype

Hey guys, we have had a couple of requests from clients now who would like a PDF of the animated online version we have produced through hype. It doesn't seem to be available at this time. Is there a work around or consideration for this to be added to the export possibilities?

Thanks

Are you not able to just open the html page and print/ save to pdf ?

You could use a combination of html2canvas and jsPDF.

Here is an implementation of html2canvas:

And here is a discussion about the idea:

Thank you. Unfortunately, when I print PDF loads of white boxes appear where elements should be.

Thanks MaxZieb, my js knowledge is low level. Would it not be easier to just to include an export from Hype to export to PDF?

Well, you can always just export an image and then print it to PDF like so:
Export the frames you need as PNG and then open them and choose print and then "save as PDF"


If you need more control... here is a simple example with JS:
Image-with-Options-as-PDF.hype.zip (73,9 KB)

external dependencies only:
Image-with-Options-as-PDF-external-Dependancies.hype.zip (34,1 KB)

2 Likes

Thanks again. So that works to create a PDF, how do I make that work the same in my hype file?

You copy over the content of HTML-Head (see external dependencies only- version) and setup the save function and a trigger for it.


Like I said if that is too much you can also just do the following:

  1. Go to the Document Inspector
  2. Scroll down and take a Poster Image
  3. Select the Poster Image in the resource panel and click the eye
  4. Click open in Preview
  5. Print and set in the dialog use Save as PDF instead of Print
3 Likes

Oh thanks, that works well. I ended up creating the poster image as you suggested, then right clicking the poster image in the resources panel and opening in illustrator. Then simply saving as a PDF. Thanks for your help MaxZieb!

1 Like

OMG! @MaxZieb! I was searching long time for this solution! (Save HTML to PDF file using html2canvas + jsPDF)
Thank you, again!

2 Likes