anvithks / hugo-embed-pdf-shortcode

A shortcode for Hugo(https://gohugo.io/) which allows you to embed a PDF file in a page using Pdf.js (https://mozilla.github.io/pdf.js/)
https://hugo-embed-pdf.netlify.app/
MIT License
135 stars 56 forks source link

Users can view PDFs but preventing them the download #42

Open nicfab opened 1 year ago

nicfab commented 1 year ago

Is your feature request related to a problem? Please describe. Sometimes allowing users only to view some PDFs is preferable, preventing them from downloading them. Sometimes you may want to share PDFs, but you want to prevent the download for various reasons.

Describe the solution you'd like So, you can implement the plugin code with a feature that allows avoiding downloading PDFs. In that way, PDFs can remain "embedded" in the webpage, and users can only view them page by page, but they should not be allowed to download PDFs. It's like a security mode.

I much appreciate it if you consider this suggestion soon. See issue #26

anvithks commented 1 year ago

@nicfab Working on this. Will try to implement and push this soon.

sjhloco commented 10 months ago

I needed this feature so created a fix as per this disable_download branch. Not sure if you are currently in process or can contribute if needed, thanks