Web pdf tag a with download is not valid only preview

I implement preview pdf in web. As long as the href to the file link browser will preview automatically, but I add the download attribute under the a tag or just preview but not download. How to solve this?

Mar.05,2021
The attribute of the

a tag only applies to the same origin URLs, cross-domain, which causes the download attribute to be invalid.
clipboard.png

Menu