Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

120
Visualizações
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 Respostas
Responde à pergunta

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 Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda