sd_30
sd_30

Reputation: 698

Failed to load pdf error in angular code?

I want to have a link on my application which when clicked downloads a pdf file saved in the assets folder. When I am clicking the link it is downloading the pdf but on opening it, it is giving the error:

Failed to load pdf document.

<a class = "help-link" download="User-Guide-televiewer" target="_blank" href="/assets/televiewer-file.pdf">
    Help 
</a>

Upvotes: 0

Views: 691

Answers (1)

sd_30
sd_30

Reputation: 698

I was manually creating the pdf file with .pdf extension. Nothing wrong with the code. Just the file error.

Upvotes: 1

Related Questions