Set a different downloadable element for each page in a sidebar

I have an educational website where a rule is explained on a page, and there is a downloadable PDF for each rule on the same page.
I’d eventually like to include this downloadable element in a sidebar, alongside other fixed widgets (login etc.).
Is there any way to have a fixed emplacement in a sidebar, with a fixed appearance as well, but for which I could specify a different download link for each page ?

If sidebars aren’t the right tool for the job, any other idea would be much welcome !

For now I have a floating element with only the link to the PDF, which is in a page template.

floating element