TwisterMc / pdfjs-viewer-shortcode

A Wordpress plugin for embedding PDFs using Mozilla's Excellent PDF.js
https://wordpress.org/plugins/pdfjs-viewer-shortcode/
Apache License 2.0
7 stars 4 forks source link

Preventing Ctrl+P #15

Open PratyayG opened 2 years ago

PratyayG commented 2 years ago

Hi,

First of all, I must say it is the best pdf embedder I have found on Wordpress.

However, I found one issue which I must draw your attention to. Whenever, a user is making the printing option false, it is most likely that they want to switch off the printing function completely. What I see is that only the printing button gets removed. One can still print the file using Ctrl+P or Right Click>Print. Is that what you can fix from here? Or, it is to be done from mozilla/pdf.js?

If it is doable from here, I would like to have that feature.

Best,

Pratyay

TwisterMc commented 2 years ago

Right now, I only hide the print button. Preventing people from printing would have to be supported by Mozilla's PDFjs library or I'd have to dig into it to better understand if this functionality is possible.