# C1.C1Pdf.C1PdfDocument.AddBookmark

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Pdf_C1PdfDocument_AddBookmark_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark*">AddBookmark Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Pdf_C1PdfDocument_AddBookmark_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_Double_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark(System.String,System.Int32,System.Double)">AddBookmark(string, int, double)</h4>
<div class="markdown level1 summary"><p>Adds a bookmark to the current page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddBookmark(string text, int level, double y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddBookmark(text As String, level As Integer, y As Double)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text that appears on the outline tree.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>Outline level (zero is the top level).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Position on the current page where the outline entry is located (in points).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_Double__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>Most long Pdf documents contain an outline structure that is displayed on a pane
on the left of the reader. The outline makes it easy to browse through a
document's structure and find specific topics. The <b>AddBookmark</b>
method allows you to build this outline structure by adding outline entries
(bookmarks).</p>
</div>


<a id="C1_C1Pdf_C1PdfDocument_AddBookmark_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_Double_System_Boolean_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark(System.String,System.Int32,System.Double,System.Boolean)">AddBookmark(string, int, double, bool)</h4>
<div class="markdown level1 summary"><p>Adds a bookmark to the current page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddBookmark(string text, int level, double y, bool isOpen)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddBookmark(text As String, level As Integer, y As Double, isOpen As Boolean)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text that appears on the outline tree.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>Outline level (zero is the top level).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Position on the current page where the outline entry is located (in points).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">isOpen</span></td>
      <td><p>Whether the children of the bookmark are initially visible.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Pdf_C1PdfDocument_AddBookmark_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_Int32_System_Double_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark(System.String,System.Int32,System.Int32,System.Double)">AddBookmark(string, int, int, double)</h4>
<div class="markdown level1 summary"><p>Adds a bookmark to the specified page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddBookmark(string text, int level, int page, double y)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddBookmark(text As String, level As Integer, page As Integer, y As Double)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text that appears on the outline tree.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>Outline level (zero is the top level).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">page</span></td>
      <td><p>Index of the page that contains the bookmark.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.double">double</a></td>
      <td><span class="parametername">y</span></td>
      <td><p>Position on the specified page where the outline entry is located (in points).</p>
</td>
    </tr>
  </tbody>
</table>


<a id="C1_C1Pdf_C1PdfDocument_AddBookmark_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_String_" data-uid="C1.C1Pdf.C1PdfDocument.AddBookmark(System.String,System.Int32,System.String)">AddBookmark(string, int, string)</h4>
<div class="markdown level1 summary"><p>Adds a bookmark to the specified page.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddBookmark(string text, int level, string target)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddBookmark(text As String, level As Integer, target As String)</code></pre>
</div>
<h5 class="parameters">Parameters</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Name</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">text</span></td>
      <td><p>Text that appears on the outline tree.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.int32">int</a></td>
      <td><span class="parametername">level</span></td>
      <td><p>Outline level (zero is the top level).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">target</span></td>
      <td><p>Exist target name of this document from AddTarget method.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Pdf_C1PdfDocument_AddBookmark_System_String_System_Int32_System_String__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Pdf.C1PdfDocument.AddTarget.html#C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Drawing_RectangleF_">AddTarget</a>(<a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a>, <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a>)</div>
</div>
</div>
