I won't disagree with what jllort has already stated - simply disabling the download button does not stop a user from downloading the PDF - it just makes it more difficult. If all that you want to do is make it more difficult, then there is a small edit you can make in the PDFjs code: Edit tomcat-x....