# Wijmo_Pdf_Security

## Content

<div class="content__tsd">
						<div style="display:flex;justify-content:space-between;align-items:center">
							<h1>
								wijmo.pdf.security Module
							</h1>
						</div>
						<section class="tsd-comment">
							<div class="tsd-comment">
								<div class="lead">
									<p>Provides PDF encryption and permissions settings for the <a href="wijmo_pdf.html">wijmo.pdf</a> module.</p>
								</div>
								<p>Add this module on page to be able to use the <a href="../interfaces/wijmo_pdf.ipdfdocumentoptions.html#ownerpassword">wijmo.pdf.IPdfDocumentOptions.ownerPassword</a>,
									<a href="../interfaces/wijmo_pdf.ipdfdocumentoptions.html#permissions">wijmo.pdf.IPdfDocumentOptions.permissions</a> and <a href="../interfaces/wijmo_pdf.ipdfdocumentoptions.html#userpassword">wijmo.pdf.IPdfDocumentOptions.userPassword</a>
								properties while creating an instance of the <a href="../classes/wijmo_pdf.pdfdocument.html">wijmo.pdf.PdfDocument</a> class:</p>
								<pre><code class="language-typescript"><span class="hljs-keyword">import</span> { PdfDocument, saveBlob } <span class="hljs-keyword">from</span> <span class="hljs-string">'@mescius/wijmo.pdf'</span>;
<span class="hljs-keyword">import</span> <span class="hljs-string">'@mescius/wijmo.pdf.security'</span>;

<span class="hljs-keyword">let</span> doc = <span class="hljs-keyword">new</span> PdfDocument({
   userPassword: <span class="hljs-string">'abc'</span>,
   ended: <span class="hljs-function">(<span class="hljs-params">doc, args</span>) =&gt;</span> {
      saveBlob(args.blob, <span class="hljs-string">'document.pdf'</span>);
   }
});

doc.end();</code></pre>
								<p>This module incorporates modified versions of the
									<a href="https://github.com/feross/buffer" target="_blank">buffer</a>,
									<a href="https://github.com/brix/crypto-js" target="_blank">crypto-js</a> and
									<a href="https://github.com/reklatsmasters/saslprep" target="_blank">saslprep</a>
								libraries.</p>
							</div>
						</section>
					</div>