Disable Pdf Download and Save Option

How to make PDF undownloadable using pdf.js

Here are the steps:

  1. Add jQuery library to shared folder.
  2. Include jQuery library to viewer.html file
  3. 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>

enter image description here

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

02

Method 02

Using Google Drive

Right click on pdf and goto Share(below image)

03

Then go to Advanced option in left bottom

05

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



Leave a reply



Submit