Hi,
I hope you are well,
Does someone know how to disable the copy paste feature on the pdf.js pdf viewer when it is embedded on the Thinkific https://thinkific.com/ platform ?
I disabled the copy and paste option on a pdf thanks to Adobe Acrobat Pro’s protection feature
I uploaded it on the Thinkific platform using their embedded pdf viewer pdf.js
While the protection works when I open the pdf with Adobe Acrobat Pro (I am not able to copy paste anymore), the protection does not work on the Thinkific embededded pdf viewer pdf.js (I am still able to copy paste content from the pdf).
How can I sort this out ?
Thank you
Thank you for posting your question to our forum. We will provide you with an update as soon as possible.
Hello Tonyf,
You can disable copy and pasting of annotations using the following code:
// For Mac
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CMD_C);
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CMD_V);
// For Windows
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CTRL_C);
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CTRL_V);
Best Regards,
Darian
Hi,
Thank you Darian, thank you Ejohnson for your answers.
How to change the pdf.js code when it is embedded in Thinkific ?
Thank you
Hello Tonyf,
We are not familiar with the Thinkific platform. Do you have access to the PDF.js Express project? When WebViewer is instantiated, in the then block, you can use these APIs.
WebViewer({
licenseKey: 'YOUR_LICENSE_KEY'
}, document.getElementById('viewer'))
.then(function(instance) {
const documentViewer = instance.Core.documentViewer;
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CMD_C);
instance.UI.hotkeys.off(instance.UI.hotkeys.Keys.CMD_V);
});