Document download action task not working

I was trying to download a document using an action task.

  1. If I paste a direct URL in the task, the button is not working
  2. If I add the link in an HTML control link that to a text document. And then use the text document variable to the action task, it downloads in HTML form and then the page does not load in proper formatting.