The most reliable way to remove the download option is to hide the #download element within the internal index.html or a local stylesheet.
Navigate to the ViewerJS directory and open index.html . Add the following CSS block within the tags or before the closing tag: #download { display: none !important; } Use code with caution. viewerjs disable download button
This snippet waits for the window to load and then removes the download button from the DOM: javascript $(window).load(function() { $('#download').remove(); }); Use code with caution. The most reliable way to remove the download
Checking the in developer tools to download the source file directly. This snippet waits for the window to load
Are you embedding these files from a than your main website, or are they hosted on the same server ? How to disable the download button in ViewerJS?
$('#your-iframe-id').ready(function() { $(this).contents().find('#download').hide(); }); Use code with caution. Summary of Targeted UI Elements