<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd"> <html> <head> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> <title>Set permissions for the document</title> </head> <body><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="harudoc.setpassword.html">HaruDoc::setPassword</a></div> <div class="next" style="text-align: right; float: right;"><a href="harudoc.usecnsencodings.html">HaruDoc::useCNSEncodings</a></div> <div class="up"><a href="class.harudoc.html">HaruDoc</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div><hr /><div id="harudoc.setpermission" class="refentry"> <div class="refnamediv"> <h1 class="refname">HaruDoc::setPermission</h1> <p class="verinfo">(PECL haru >= 0.0.1)</p><p class="refpurpose"><span class="refname">HaruDoc::setPermission</span> — <span class="dc-title">Set permissions for the document</span></p> </div> <div class="refsect1 description" id="refsect1-harudoc.setpermission-description"> <h3 class="title">Description</h3> <div class="methodsynopsis dc-description"> <span class="type">bool</span> <span class="methodname"><strong>HaruDoc::setPermission</strong></span> ( <span class="methodparam"><span class="type">int</span> <code class="parameter">$permission</code></span> )</div> <p class="para rdfs-comment"> Defines permissions for the document. </p> </div> <div class="refsect1 parameters" id="refsect1-harudoc.setpermission-parameters"> <h3 class="title">Parameters</h3> <p class="para"> <dl> <dt> <span class="term"><em><code class="parameter">permission</code></em></span> <dd> <p class="para"> The values is a combination of these flags: <ul class="simplelist"> <li class="member"> <strong><code>HaruDoc::ENABLE_READ</code></strong> - user can read the document. </li> <li class="member"> <strong><code>HaruDoc::ENABLE_PRINT</code></strong> - user can print the document. </li> <li class="member"> <strong><code>HaruDoc::ENABLE_EDIT_ALL</code></strong> - user can edit the contents of the document other than annotations and form fields. </li> <li class="member"> <strong><code>HaruDoc::ENABLE_COPY</code></strong> - user can copy the text and the graphics of the document. </li> <li class="member"> <strong><code>HaruDoc::ENABLE_EDIT</code></strong> - user can add or modify the annotations and form fields of the document. </li> </ul> </p> </dd> </dt> </dl> </p> </div> <div class="refsect1 returnvalues" id="refsect1-harudoc.setpermission-returnvalues"> <h3 class="title">Return Values</h3> <p class="para"> Returns <strong><code>TRUE</code></strong> on success. </p> </div> <div class="refsect1 errors" id="refsect1-harudoc.setpermission-errors"> <h3 class="title">Errors/Exceptions</h3> <p class="para">Throws a <a href="class.haruexception.html" class="classname">HaruException</a> on error.</p> </div> <div class="refsect1 seealso" id="refsect1-harudoc.setpermission-seealso"> <h3 class="title">See Also</h3> <p class="para"> <ul class="simplelist"> <li class="member"> <span class="methodname"><a href="harudoc.setpassword.html" class="methodname" rel="rdfs-seeAlso">HaruDoc::setPassword()</a> - Set owner and user passwords for the document</span></li> <li class="member"> <span class="methodname"><a href="harudoc.setencryptionmode.html" class="methodname" rel="rdfs-seeAlso">HaruDoc::setEncryptionMode()</a> - Set encryption mode for the document</span></li> </ul> </p> </div> </div><hr /><div class="manualnavbar" style="text-align: center;"> <div class="prev" style="text-align: left; float: left;"><a href="harudoc.setpassword.html">HaruDoc::setPassword</a></div> <div class="next" style="text-align: right; float: right;"><a href="harudoc.usecnsencodings.html">HaruDoc::useCNSEncodings</a></div> <div class="up"><a href="class.harudoc.html">HaruDoc</a></div> <div class="home"><a href="index.html">PHP Manual</a></div> </div></body></html>