# Disabling any printscreen, screenshot, web capture, or something like that

**URL:** <https://pdfjs.community/t/disabling-any-printscreen-screenshot-web-capture-or-something-like-that/2638>\
**Category:** Technical Support\
**Tags:** pdfjs-express\
**Created:** [June 13, 2023, 4:24pm UTC](https://pdfjs.community/t/disabling-any-printscreen-screenshot-web-capture-or-something-like-that/2638 "2023-06-13T16:24:25Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![dhiyaulkhaqala](https://avatars.discourse-cdn.com/v4/letter/d/ea5d25/32.png) [@dhiyaulkhaqala](https://pdfjs.community/u/dhiyaulkhaqala)\
**Post date:** [June 13, 2023, 4:24pm UTC](https://pdfjs.community/t/disabling-any-printscreen-screenshot-web-capture-or-something-like-that/2638/1 "2023-06-13T16:24:25Z")

</div>

**Which product are you using?** PDF.js Express Viewer

**PDF.js Express Version** “^8.7.1”,

**Detailed description of issue**  
I wanna disable feature like screenshot, or web capture. But it doesnt provide in this site [PDFJS Express WebViewer Namespace: UI](https://pdfjs.express/api/UI.html). I tried with disabling printscreen button with onKeyUp, it works. But user still can use right click, web capture. I search for disaling right click, but the community says that was useless but annoy user.

**Expected behaviour**  
Client hope user cant copy or take any content to the other. Wanna use it for digital library exclusively for the member.

**Does your issue happen with every document, or just one?**  
Happen with every document

**Link to document**  
Sorry we can’t

**Code snippet**  
{Provide a relevant code snippet}  
document.addEventListener(“keyup”, function (e) {  
var keyCode = e.keyCode ? e.keyCode : e.which;  
if (keyCode == 44) {  
stopPrntScr();  
}  
});  
function stopPrntScr() {  
var inpFld = document.createElement(“input”);  
inpFld.setAttribute(“value”, “.”);  
inpFld.setAttribute(“width”, “0”);  
inpFld.style.height = “0px”;  
inpFld.style.width = “0px”;  
inpFld.style.border = “0px”;  
document.body.appendChild(inpFld);  
inpFld.select();  
document.execCommand(“copy”);  
inpFld.remove(inpFld);  
}  
function AccessClipboardData() {  
try {  
window.clipboardData.setData(“text”, “Access Restricted”);  
} catch (err) {}  
}

setInterval(AccessClipboardData(), 300);

---

<div class="post-metadata">

**Author:** ![tgordon](https://avatars.discourse-cdn.com/v4/letter/t/aca169/32.png) [@tgordon](https://pdfjs.community/u/tgordon)\
**Post date:** [June 13, 2023, 8:47pm UTC](https://pdfjs.community/t/disabling-any-printscreen-screenshot-web-capture-or-something-like-that/2638/2 "2023-06-13T20:47:48Z")

</div>

Hello dhiyaulkhaqala,

The browser has many ways to capture the screen, PDFJS Express cannot modify the browser.

The only thing we have control over is printing, which you can disable through:

`instance.UI.disableFeatures([instance.UI.Feature.Print])`

Best regards,  
Tyler
