Welcome to the in5 Answer Exchange! This a place to get answers about in5 (InDesign to HTML5) and make requests.
0 votes
Hello!

This is my first time on this forum, so please excuse any mistakes on my part. I have a quick question about hyperlink integration: I would like to integrate a button that downloads a PDF via a hyperlink. Since the PDF is not displayed correctly in browsers, I would like to prevent a preview in the browser and directly initiate the download. In HTML5 the whole thing would look something like this:

<a href="hyperlink" download>Download</a>

Is there a way to do it this way with in5? Thank you very much for your help and support and have a nice day,

Kind regards,
Fabian
in how_to by (140 points)
  

1 Answer

0 votes

You could try the download attribute:
How to force a file to download instead of open in the browser using only HTML

There is the more complicated JavaScript solution, but you may need help from a web developer implementing it:
Force Download with JavaScript

by (17.3k points)
Thank you very much for your reply =) Unfortunately, the download attribute doesn't seem to work. Time to get in touch with a web developer to implement it with js.
Sounds good. I'd be interested to hear how it goes. :)