# GrapeCity.Documents.Svg.GcSvgDocument.FromStream

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_Documents_Svg_GcSvgDocument_FromStream_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.FromStream*">FromStream Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_Documents_Svg_GcSvgDocument_FromStream_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.FromStream*"></a>
<h4 id="GrapeCity_Documents_Svg_GcSvgDocument_FromStream_System_IO_Stream_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.FromStream(System.IO.Stream)">FromStream(Stream)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a> from a specified SVG data stream.</p>
<p>
The stream will be closed after reading the SVG data.
To keep the stream open, use the <a class="xref" href="GrapeCity.Documents.Svg.GcSvgDocument.FromStream.html#GrapeCity_Documents_Svg_GcSvgDocument_FromStream_System_IO_Stream_System_Boolean_">FromStream(Stream, bool)</a> overload
and pass <a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> in the leaveOpen parameter.
</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static GcSvgDocument FromStream(Stream stream)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function FromStream(stream As Stream) As GcSvgDocument</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The stream containing the SVG data.</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="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a></td>
      <td><p>The created SVG document.</p>
</td>
    </tr>
  </tbody>
</table>


<a id="GrapeCity_Documents_Svg_GcSvgDocument_FromStream_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.FromStream*"></a>
<h4 id="GrapeCity_Documents_Svg_GcSvgDocument_FromStream_System_IO_Stream_System_Boolean_" data-uid="GrapeCity.Documents.Svg.GcSvgDocument.FromStream(System.IO.Stream,System.Boolean)">FromStream(Stream, bool)</h4>
<div class="markdown level1 summary"><p>Creates a new <a class="xref" href="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a> from a specified SVG data stream,
optionally leaving the stream open.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static GcSvgDocument FromStream(Stream stream, bool leaveOpen)</code></pre>
</div>
<div class="codewrapper">
  <pre><code class="lang-vbnet hljs">Public Shared Function FromStream(stream As Stream, leaveOpen As Boolean) As GcSvgDocument</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.io.stream">Stream</a></td>
      <td><span class="parametername">stream</span></td>
      <td><p>The stream containing the SVG data.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">leaveOpen</span></td>
      <td><p><a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">true</a> to leave the stream open after reading the data,
<a href="https://learn.microsoft.com/dotnet/csharp/language-reference/builtin-types/bool">false</a> to close the stream.</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="GrapeCity.Documents.Svg.GcSvgDocument.html">GcSvgDocument</a></td>
      <td><p>The created SVG document.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
