# FarPoint.Web.Spread.FpSpread.SavePdfToResponse

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*">SavePdfToResponse Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse">SavePdfToResponse()</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse()</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse() As Boolean</code></pre>
</div>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_FarPoint_PDF_Source_Encryption_PdfSecurity_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse(FarPoint.PDF.Source.Encryption.PdfSecurity)">SavePdfToResponse(PdfSecurity)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
<param name="pdfSecurity">The password to encrypt pdf file
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse(PdfSecurity pdfSecurity)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse(pdfSecurity As PdfSecurity) 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><span class="xref">PdfSecurity</span></td>
      <td><span class="parametername">pdfSecurity</span></td>
      <td></td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_System_String_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse(System.String)">SavePdfToResponse(string)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse(string fileName)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse(fileName As String) 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">fileName</span></td>
      <td><p>Path and file name</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_System_String_FarPoint_PDF_Source_Encryption_PdfSecurity_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse(System.String,FarPoint.PDF.Source.Encryption.PdfSecurity)">SavePdfToResponse(string, PdfSecurity)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse(string fileName, PdfSecurity pdfSecurity)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse(fileName As String, pdfSecurity As PdfSecurity) 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">fileName</span></td>
      <td><p>Path and file name</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">PdfSecurity</span></td>
      <td><span class="parametername">pdfSecurity</span></td>
      <td><p>The password to encrypt pdf file</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_System_Int32_System_String_System_Boolean_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse(System.Int32,System.String,System.Boolean)">SavePdfToResponse(int, string, bool)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse(int sheet, string fileName, bool showInBrowser)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse(sheet As Integer, fileName As String, showInBrowser As Boolean) 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.int32">int</a></td>
      <td><span class="parametername">sheet</span></td>
      <td><p>Index of sheet to print; -1 for all sheets</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>Path and file name</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showInBrowser</span></td>
      <td><p>Whether to show the PDF in a browser</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>


<a id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse*"></a>
<h4 id="FarPoint_Web_Spread_FpSpread_SavePdfToResponse_System_Int32_System_String_System_Boolean_FarPoint_PDF_Source_Encryption_PdfSecurity_" data-uid="FarPoint.Web.Spread.FpSpread.SavePdfToResponse(System.Int32,System.String,System.Boolean,FarPoint.PDF.Source.Encryption.PdfSecurity)">SavePdfToResponse(int, string, bool, PdfSecurity)</h4>
<div class="markdown level1 summary"><p>Saves the contents of the Spread component to a Response object in PDF file format.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public bool SavePdfToResponse(int sheet, string fileName, bool showInBrowser, PdfSecurity pdfSecurity)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Function SavePdfToResponse(sheet As Integer, fileName As String, showInBrowser As Boolean, pdfSecurity As PdfSecurity) 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.int32">int</a></td>
      <td><span class="parametername">sheet</span></td>
      <td><p>Index of sheet to print; -1 for all sheets</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.string">string</a></td>
      <td><span class="parametername">fileName</span></td>
      <td><p>Path and file name</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showInBrowser</span></td>
      <td><p>Whether to show the PDF in a browser</p>
</td>
    </tr>
    <tr>
      <td><span class="xref">PdfSecurity</span></td>
      <td><span class="parametername">pdfSecurity</span></td>
      <td><p>The password to encrypt pdf file</p>
</td>
    </tr>
  </tbody>
</table>
<h5 class="returns">Returns</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Description</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td></td>
    </tr>
  </tbody>
</table>
</div>
