I want to protect my website PDF files from downloading and snapshot or Ctrl+P. I read that it can be done by JavaScript but I'm unable do it.
Not possiable
In order for the client or user to see and read the PDF, your serve needs to server it. To send a copy of it to the clients broswer. The user can always download the PDF becuase you need to send it