# C1.C1Pdf.C1PdfDocument.AddTarget

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="C1_C1Pdf_C1PdfDocument_AddTarget_" data-uid="C1.C1Pdf.C1PdfDocument.AddTarget*">AddTarget Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="C1_C1Pdf_C1PdfDocument_AddTarget_" data-uid="C1.C1Pdf.C1PdfDocument.AddTarget*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Drawing_RectangleF_" data-uid="C1.C1Pdf.C1PdfDocument.AddTarget(System.String,System.Drawing.RectangleF)">AddTarget(string, RectangleF)</h4>
<div class="markdown level1 summary"><p>Adds a hyperlink target 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 AddTarget(string name, RectangleF rc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddTarget(name As String, rc As RectangleF)</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">name</span></td>
      <td><p>Name of the target (used in the AddLink method).</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>Area on the page that will behave as a target (in points from the top-left corner of the page).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Drawing_RectangleF__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is used to add targets for local hyperlinks. See the AddLink method for details and an example.</p>
</div>
<h5 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Drawing_RectangleF__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Pdf.C1PdfDocument.AddLink.html#C1_C1Pdf_C1PdfDocument_AddLink_System_String_System_Drawing_RectangleF_">AddLink</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>


<a id="C1_C1Pdf_C1PdfDocument_AddTarget_" data-uid="C1.C1Pdf.C1PdfDocument.AddTarget*"></a>
<h4 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Int32_System_Drawing_RectangleF_" data-uid="C1.C1Pdf.C1PdfDocument.AddTarget(System.String,System.Int32,System.Drawing.RectangleF)">AddTarget(string, int, RectangleF)</h4>
<div class="markdown level1 summary"><p>Adds a hyperlink target to the document.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public void AddTarget(string name, int page, RectangleF rc)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Sub AddTarget(name As String, page As Integer, rc As RectangleF)</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">name</span></td>
      <td><p>Name of the target (used in the AddLink method).</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 will contain the hyperlink target.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.drawing.rectanglef">RectangleF</a></td>
      <td><span class="parametername">rc</span></td>
      <td><p>Area on the page that will behave as a target (in points from the top-left corner of the page).</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Int32_System_Drawing_RectangleF__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is used to add targets for local hyperlinks. See the AddLink method for details and an example.</p>
</div>
<h5 id="C1_C1Pdf_C1PdfDocument_AddTarget_System_String_System_Int32_System_Drawing_RectangleF__seealso">See Also</h5>
<div class="seealso">
    <div><a class="xref" href="C1.C1Pdf.C1PdfDocument.AddLink.html#C1_C1Pdf_C1PdfDocument_AddLink_System_String_System_Drawing_RectangleF_">AddLink</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>
