<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"> <html> <head> <link rel="stylesheet" href="style.css" type="text/css"> <meta content="text/html; charset=iso-8859-1" http-equiv="Content-Type"> <link rel="Start" href="index.html"> <link rel="previous" href="Pdf.html"> <link rel="next" href="Pdfflate.html"> <link rel="Up" href="index.html"> <link title="Index of types" rel=Appendix href="index_types.html"> <link title="Index of exceptions" rel=Appendix href="index_exceptions.html"> <link title="Index of values" rel=Appendix href="index_values.html"> <link title="Index of modules" rel=Appendix href="index_modules.html"> <link title="Pdfutil" rel="Chapter" href="Pdfutil.html"> <link title="Pdfio" rel="Chapter" href="Pdfio.html"> <link title="Pdftransform" rel="Chapter" href="Pdftransform.html"> <link title="Pdfunits" rel="Chapter" href="Pdfunits.html"> <link title="Pdfpaper" rel="Chapter" href="Pdfpaper.html"> <link title="Pdf" rel="Chapter" href="Pdf.html"> <link title="Pdfcrypt" rel="Chapter" href="Pdfcrypt.html"> <link title="Pdfflate" rel="Chapter" href="Pdfflate.html"> <link title="Pdfcodec" rel="Chapter" href="Pdfcodec.html"> <link title="Pdfwrite" rel="Chapter" href="Pdfwrite.html"> <link title="Pdfgenlex" rel="Chapter" href="Pdfgenlex.html"> <link title="Pdfread" rel="Chapter" href="Pdfread.html"> <link title="Pdfjpeg" rel="Chapter" href="Pdfjpeg.html"> <link title="Pdfops" rel="Chapter" href="Pdfops.html"> <link title="Pdfdest" rel="Chapter" href="Pdfdest.html"> <link title="Pdfmarks" rel="Chapter" href="Pdfmarks.html"> <link title="Pdfpagelabels" rel="Chapter" href="Pdfpagelabels.html"> <link title="Pdfpage" rel="Chapter" href="Pdfpage.html"> <link title="Pdfannot" rel="Chapter" href="Pdfannot.html"> <link title="Pdffun" rel="Chapter" href="Pdffun.html"> <link title="Pdfspace" rel="Chapter" href="Pdfspace.html"> <link title="Pdfimage" rel="Chapter" href="Pdfimage.html"> <link title="Pdfafm" rel="Chapter" href="Pdfafm.html"> <link title="Pdfafmdata" rel="Chapter" href="Pdfafmdata.html"> <link title="Pdfglyphlist" rel="Chapter" href="Pdfglyphlist.html"> <link title="Pdftext" rel="Chapter" href="Pdftext.html"> <link title="Pdfstandard14" rel="Chapter" href="Pdfstandard14.html"> <link title="Pdfgraphics" rel="Chapter" href="Pdfgraphics.html"> <link title="Pdfshapes" rel="Chapter" href="Pdfshapes.html"> <link title="Pdfdate" rel="Chapter" href="Pdfdate.html"> <link title="Pdfocg" rel="Chapter" href="Pdfocg.html"> <link title="Pdfcff" rel="Chapter" href="Pdfcff.html"> <link title="Pdftype1" rel="Chapter" href="Pdftype1.html"> <link title="Pdftruetype" rel="Chapter" href="Pdftruetype.html"> <link title="Pdftype0" rel="Chapter" href="Pdftype0.html"> <link title="Pdfmerge" rel="Chapter" href="Pdfmerge.html"><title>Pdfcrypt</title> </head> <body> <div class="navbar"><a class="pre" href="Pdf.html" title="Pdf">Previous</a> <a class="up" href="index.html" title="Index">Up</a> <a class="post" href="Pdfflate.html" title="Pdfflate">Next</a> </div> <h1>Module <a href="type_Pdfcrypt.html">Pdfcrypt</a></h1> <pre><span class="keyword">module</span> Pdfcrypt: <code class="code">sig</code> <a href="Pdfcrypt.html">..</a> <code class="code">end</code></pre><div class="info module top"> Decrypting PDF files<br> </div> <hr width="100%"> <br> Note that encryption depends on fixed object and generation numbers: don't change these (for example by calling <code class="code">Pdf.remove_unreferenced</code> on the PDF) before writing. <p> Encryption support is part of the <code class="code">Pdfwrite</code> module, since files are encrypted when they're written.<br> <pre><span id="VALcrypt_debug"><span class="keyword">val</span> crypt_debug</span> : <code class="type">bool Pervasives.ref</code></pre><div class="info "> If this is set, various debug is produced on standard output. On startup, is set to false<br> </div> <pre><code><span id="TYPEpermission"><span class="keyword">type</span> <code class="type"></code>permission</span> = </code></pre><table class="typetable"> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoEdit"><span class="constructor">NoEdit</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoPrint"><span class="constructor">NoPrint</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoCopy"><span class="constructor">NoCopy</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoAnnot"><span class="constructor">NoAnnot</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoForms"><span class="constructor">NoForms</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoExtract"><span class="constructor">NoExtract</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoAssemble"><span class="constructor">NoAssemble</span></span></code></td> </tr> <tr> <td align="left" valign="top" > <code><span class="keyword">|</span></code></td> <td align="left" valign="top" > <code><span id="TYPEELTpermission.NoHqPrint"><span class="constructor">NoHqPrint</span></span></code></td> </tr></table> <pre><span id="VALdecrypt_pdf"><span class="keyword">val</span> decrypt_pdf</span> : <code class="type">?keyfromowner:string -><br> string -> <a href="Pdf.html#TYPEt">Pdf.t</a> -> <a href="Pdf.html#TYPEt">Pdf.t</a> option * <a href="Pdfcrypt.html#TYPEpermission">permission</a> list</code></pre><div class="info "> Decrypt a PDF document, given the user password, returning the permissions under which the document was encrypted.<br> </div> <pre><span id="VALdecrypt_pdf_owner"><span class="keyword">val</span> decrypt_pdf_owner</span> : <code class="type">string -> <a href="Pdf.html#TYPEt">Pdf.t</a> -> <a href="Pdf.html#TYPEt">Pdf.t</a> option</code></pre><div class="info "> Decrypt a PDF document, given the owner password.<br> </div> <pre><span id="VALis_encrypted"><span class="keyword">val</span> is_encrypted</span> : <code class="type"><a href="Pdf.html#TYPEt">Pdf.t</a> -> bool</code></pre><div class="info "> Is a PDF encrypted?<br> </div> </body></html>