# GrapeCity.Documents.Pdf.DecryptionOptions

## Content

<div class="doc-site-dotnet-api-container">



  <h1 id="GrapeCity_Documents_Pdf_DecryptionOptions" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions" class="text-break">DecryptionOptions Class
</h1>
  <div class="markdown level0 summary"><p>Represents decryption options used when loading a PDF document.</p>
</div>
  <div class="markdown level0 conceptual"></div>
  <div class="inheritance">
    <h5>Inheritance</h5>
    <div class="level0"><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.object">object</a></div>
    <div class="level1"><span class="xref">DecryptionOptions</span></div>
  </div>
  <h6><strong>Namespace</strong>: <a class="xref" href="GrapeCity.Documents.Pdf.html">GrapeCity.Documents.Pdf</a></h6>
  <h6><strong>Assembly</strong>: DS.Documents.Pdf.dll</h6>
  <h5 id="GrapeCity_Documents_Pdf_DecryptionOptions_syntax">Syntax</h5>
  <div class="codewrapper">
    <pre><code class="lang-csharp hljs">public class DecryptionOptions</code></pre>
  </div>
  <div class="codewrapper">
    <pre><code class="lang-vbnet hljs">Public Class DecryptionOptions</code></pre>
  </div>
  <h3 id="constructors">Constructors
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Pdf_DecryptionOptions__ctor" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions.#ctor">
          <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.-ctor.html#GrapeCity_Documents_Pdf_DecryptionOptions__ctor">DecryptionOptions()</a>
        </td>
        <td class="markdown level1 summary"></td>
      </tr>
    </tbody>
  </table>
  <h3 id="properties">Properties
</h3>
  <table class="table table-bordered table-condensed">
    <thead>
      <tr>
        <th>Name</th>
        <th>Description</th>
      </tr>
    </thead>
    <tbody>
      <tr>
        <td id="GrapeCity_Documents_Pdf_DecryptionOptions_BytesPassword" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions.BytesPassword">
          <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.BytesPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_BytesPassword">BytesPassword</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the bytes array specifying the password to open a PDF document.
This property is useful when password contains specific regional character
which cannot be converted to bytes using UTF8 encoding.</p>
<p>
Note that only one of <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.StringPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_StringPassword">StringPassword</a> or <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.BytesPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_BytesPassword">BytesPassword</a> can be specified,
but not both.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_DecryptionOptions_StringPassword" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions.StringPassword">
          <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.StringPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_StringPassword">StringPassword</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets the string specifying the password to open a PDF document.</p>
<p>
Note that only one of <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.StringPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_StringPassword">StringPassword</a> or <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.BytesPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_BytesPassword">BytesPassword</a> can be specified,
but not both.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_DecryptionOptions_ThrowExceptionIfInvalidPassword" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions.ThrowExceptionIfInvalidPassword">
          <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.ThrowExceptionIfInvalidPassword.html#GrapeCity_Documents_Pdf_DecryptionOptions_ThrowExceptionIfInvalidPassword">ThrowExceptionIfInvalidPassword</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether to throw an exception
if the specified password is invalid.</p>
<p>
If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>, the document will be opened even if the specified password is invalid,
but many methods and properties will not work in this case.
The default is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p>
</td>
      </tr>
      <tr>
        <td id="GrapeCity_Documents_Pdf_DecryptionOptions_ThrowExceptionIfUnsupportedSecurityOptions" data-uid="GrapeCity.Documents.Pdf.DecryptionOptions.ThrowExceptionIfUnsupportedSecurityOptions">
          <a class="xref" href="GrapeCity.Documents.Pdf.DecryptionOptions.ThrowExceptionIfUnsupportedSecurityOptions.html#GrapeCity_Documents_Pdf_DecryptionOptions_ThrowExceptionIfUnsupportedSecurityOptions">ThrowExceptionIfUnsupportedSecurityOptions</a>
        </td>
        <td class="markdown level1 summary"><p>Gets or sets a value indicating whether to throw an exception
if the definition of the security handler is in unknown or invalid format.</p>
<p>
If <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a>, the document will be opened even if the security handler cannot be parsed,
but many methods and properties will not work in this case.
The default is <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a>.</p>
</td>
      </tr>
    </tbody>
  </table>

</div>
