How to make PDF undownloadable using pdf.js
Here are the steps:
- Add jQuery library to shared folder.
- Include jQuery library to viewer.html file
Add this on the header section:
<script>
$(function(){
$('#download').hide();
});
</script>
Done!
Disable copy and print options in pdf viewer
I found a solution in this... here is the link where i got a solution
Hiding the toolbars surrounding an embedded pdf?
And i have updated my html code as below and its working
<iframe src="{{ url('uploads/chapters/Author.pdf') }}#toolbar=0&navpanes=0&scrollbar=0" title="PDF in an i-Frame" frameborder="0" scrolling="auto" style="width:100%; height:100%;"></iframe>
PHP to view PDF on web page and disable user to download
Method 01
Implementing that useing Google books
<iframe frameborder="0" scrolling="no" style="border:0px" src="https://books.google.com.kh/books?id=e5MkzETNcsgC&lpg=PP1&dq=typography&pg=PA11&output=embed" width="500" height=500>
</iframe>
In above image it shows Embed
that will be the code. And Download or Print option is not available on this. Google dosc can prevent download but its allow to Save to Drive
option. Then in drive i can download it. But Google books not allow any of that.
in view
Method 02
Using Google Drive
Right click on pdf
and goto Share(below image)
Then go to Advanced option in left bottom
Tick Both check boxes. After copy embed
link and paste it to your src
. No download and Save drive option is not allowed
Note: Method 01 and Method 02 is Tested
Prevent PDF file from downloading and printing
Ultimately you will need to:
- Create Images for each page
- Present those to the user on the web via your own interface (html, flash etc)
Keep in mind flash wont work on Apple devices if that's required.
A print screen will allow someone to recreate the low res image you present, and in this case you could add a watermark to the image.
Related Topics
How to Display the Entire Object in Console in React Native
How to Add Button on Each Row in Datatable
How to Refresh Specific Div Using Javascript/Jquery With the Variables on It
Call 2 Functions Within Onchange Event
How to Change Image Source on Hover Using Javascript, But Applies to Each Individual Photo
How to Count Text Lines Inside an Dom Element Can I
Updating Array in Object Properties Using Property'S Name
Chat Box, Auto Scroll to Bottom
How to Parse Xml File in React
Move an Image With JavaScript Using Mouse Events
Javascript to Check for Event Without Page Refresh
How to Detect iPad and iPad Os Version in iOS 13 and Up
Uploading a File from a Bootstrap Modal Using Ajax
Increase and Decrease Number With JavaScript and Two Buttons Up and Down
Electron, After Browserify, Fs.Existssync Is Not a Function
How to Iterate Using Ngfor Loop Map Containing Key as String and Values as Map Iteration