how to generate the html code of current page and download on click code example Example: html download link <a href="the/name/of/your/file.x" download>