Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

119
Views
Prevent right click on embeded PDF

I have pdf's on a clients site using tags, the client has requested that I prevent users from right clicking the document to stop them from saving the files (Yes I am aware this is foolish but they are adamant that this is what they want).

I have looked at many ways of achieving this but none seem to work (Some work put prevent scrolling).

I would also like to disable CRTL+S.

about 4 years ago · Juan Pablo Isaza
1 answers
Answer question

0

While, as you said the approach is foolish and there are so many ways around it, for most users, you can just capture the contextmenu event and use event.preventDefault() to stop the context menu from appearing (or provide a custom one). It's supported by all major desktop browsers, so should do what you need it to do without hindering scrolling or anything else.

For Ctrl+S, I've not attempted this before, but filtering the keydown event may be an option (though tbh I doubt it). Other than that, I don't know of any other way to do this.

about 4 years ago · Juan Pablo Isaza Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!