WebSite X5Help Center

 
Cf Guy
Cf Guy
User

Code to Force Automatic Download of pdf file, if Button/Link is Clicked by User?  en

Autore: Cf Guy
Visite 849, Followers 1, Condiviso 0  

Hi All,

 I've just designed my first person website using Website X5 Pro, and am new to the world of website development.

Through Website X5 Pro, I have discovered how to make a PDF file open in a separate window, if a user clicks on a button or link "such as download PDF Map", but  I realize that the user will have to take the extra step to actually download the PDF file onto their hard drive, if they want to save a copy of it.

Is there a way (perhaps through coding in Website X5 Pro, to instruct/force a PDF file to automatically download onto a user's computer, if they were to click a button or link such as "Download PDF Map", etc.?

 Just wondering if this is a possibility in the Website X5 Pro program.

Many thanks for any help or suggestions anyone has to offer about this topic.

 Thanks,
-Cfguy

Postato il
1 RISPOSTE
Daniel W.
Daniel W.
User
Utente del mese EN

1) Activate HTML in the text object, see

2) Insert this HTML code in the text field and adjust the link address and link text. The addition "Download" is important.

<a href="downloads/html5-css-referenz.pdf" download>Download PDF</a>

3) And this is what the inserted HTML code looks like in the preview.

Leggi di più
Postato il da Daniel W.