Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>This really isn't possible. It sounds like what you want is for the document to be destroyed after first reading (Mission Impossible style). That's not how the web works. A file that can be accessed over the web can be easily downloaded and opened offline.</p> <p>Certainly there are hacks around this, but they would be fairly involved to implement. I once created a Flash-based viewer that loaded another file that contained the actual document. Any tech-savvy user could still obtain the original document by examining the network traffic, but your average non-technical user wouldn't know how to do it.</p> <p>You do have options for enabling restrictions in a PDF, but the user will always be able to save it and re-open it later. Probably what you want to do is implement restrictions on the document and <a href="http://www.ahfb2000.com/webmaster_help_desk/showpost.php?s=fe92c1665e42feb127a847f54ca53d1a&amp;p=38431&amp;postcount=6" rel="nofollow">load it in an iframe</a> to prevent saving.</p> <p>You can implement print/copy restrictions as follows:</p> <pre><code>$dompdf = new DOMPDF(); $dompdf-&gt;load_html($html); $dompdf-&gt;render(); $dompdf-&gt;get_canvas()-&gt;get_cpdf()-&gt;setEncryption('', 'ownerpass', array()); $dompdf-&gt;stream(); </code></pre> <p>The parameters of setEncryption are:</p> <ol> <li>string, user password (restrictions apply)</li> <li>string, owner password (unlocks document)</li> <li>array, strings indicating allowed actions when user password is supplied (e.g. print, copy). If left blank the user is limited to saving the document.</li> </ol>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload