# GrapeCity.ActiveReports.PrintExtension.Print

## Content

<div class="doc-site-dotnet-api-container">



<h1 id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*">Print Method
</h1>
<div class="markdown level0 summary"></div>
<div class="markdown level0 conceptual"></div>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.SectionDocument)">Print(SectionDocument)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a section-based document with default settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this SectionDocument sectionDocument)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.SectionDocument.html">SectionDocument</a></td>
      <td><span class="parametername">sectionDocument</span></td>
      <td><p>The section document to print.</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><p><code>true</code> if the printing process completes successfully; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method prints the document using the default settings: showing the print dialog, showing the print progress dialog, and using the printing thread.
It simplifies the printing process for common scenarios.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument__examples">Examples</h5>
<p>The following example demonstrates how to print a section document using default settings:</p>
<pre><code class="lang-csharp">SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
sectionDocument.PrintOptions.PrintPageBorder = true;
bool printSuccess = sectionDocument.Print();
if (printSuccess)
    Console.WriteLine("Printing completed successfully.");
else
    Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.SectionDocument,System.Boolean)">Print(SectionDocument, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a section-based document, with an option to display the print dialog.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.SectionDocument.html">SectionDocument</a></td>
      <td><span class="parametername">sectionDocument</span></td>
      <td><p>The section document to be printed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>Specifies whether the print dialog should be shown to the user. If <code>true</code>, the print dialog is displayed,
allowing the user to select printer settings.</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><p><code>true</code> if the print operation completes successfully; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method allows for basic customization of the printing process by controlling the visibility of the print dialog. It defaults to showing
the print progress dialog and using the printing thread for the operation, simplifying the printing process for common use cases.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean__examples">Examples</h5>
<p>The following example demonstrates how to print a section document with the print dialog:</p>
<pre><code class="lang-csharp">SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
bool printSuccess = sectionDocument.Print(showPrintDialog: true);
if (printSuccess)
    Console.WriteLine("Printing completed successfully.");
else
    Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.SectionDocument,System.Boolean,System.Boolean)">Print(SectionDocument, bool, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a section-based document, with options to display the print dialog and the print progress dialog.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog, bool showPrintProgressDialog)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.SectionDocument.html">SectionDocument</a></td>
      <td><span class="parametername">sectionDocument</span></td>
      <td><p>The section document to be printed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>Specifies whether the print dialog should be shown to the user. If <code>true</code>, the print dialog is displayed,
allowing the user to select printer settings.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintProgressDialog</span></td>
      <td><p>Specifies whether the print progress dialog should be shown during the printing process. If <code>true</code>,
the progress dialog is displayed, providing feedback about the printing status.</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><p><code>true</code> if the print operation completes successfully; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method offers more control over the printing process by allowing the user to decide whether to display the print dialog and the print progress dialog.
It defaults to using the printing thread for the operation, ensuring that the UI remains responsive during printing.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean__examples">Examples</h5>
<p>The following example demonstrates how to print a section document with both the print dialog and the print progress dialog displayed:</p>
<pre><code class="lang-csharp">SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
bool printSuccess = sectionDocument.Print(showPrintDialog: true, showPrintProgressDialog: true);
if (printSuccess)
    Console.WriteLine("Printing completed successfully.");
else
    Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_GrapeCity_Viewer_Common_PrintingSettings_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.SectionDocument,GrapeCity.Viewer.Common.PrintingSettings)">Print(SectionDocument, PrintingSettings)</h4>
<div class="markdown level1 summary"><p>Prints the section-based document using specified printing settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this SectionDocument sectionDocument, PrintingSettings settings)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.SectionDocument.html">SectionDocument</a></td>
      <td><span class="parametername">sectionDocument</span></td>
      <td><p>The document to be printed.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Viewer.Common.PrintingSettings.html">PrintingSettings</a></td>
      <td><span class="parametername">settings</span></td>
      <td><p>The printing settings to apply.</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><p><code>true</code> if the print operation was successful; otherwise, <code>false</code>.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_GrapeCity_Viewer_Common_PrintingSettings__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method decodes the provided <code class="paramref">settings</code> to determine the configuration for the print operation, such as whether to show
the print dialog, the print progress dialog, use a printing thread, and the style of the dialog.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_GrapeCity_Viewer_Common_PrintingSettings__examples">Examples</h5>
<p>The following example demonstrates how to print a section document with custom printing settings:</p>
<pre><code class="lang-csharp">SectionDocument sectionDocument = new SectionDocument();
sectionDocument.Load("C:\\Report.rdf");
PrintingSettings settings = PrintingSettings.UseStandardDialog | PrintingSettings.ShowPrintDialog;
bool printSuccess = sectionDocument.Print(settings);
if (printSuccess)
    Console.WriteLine("Printing completed successfully with custom settings.");
else
    Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.SectionDocument,System.Boolean,System.Boolean,System.Boolean)">Print(SectionDocument, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a section-based document with options for displaying print dialogs and controlling the printing execution thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this SectionDocument sectionDocument, bool showPrintDialog, bool showPrintProgressDialog, bool usePrintingThread)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.SectionDocument.html">SectionDocument</a></td>
      <td><span class="parametername">sectionDocument</span></td>
      <td><p>The section document to be printed. This document contains the content and layout information for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>Specifies whether to display the print dialog before printing. If set to <code>true</code>, the print dialog is shown,
allowing the user to select printer settings and preferences.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintProgressDialog</span></td>
      <td><p>Specifies whether to display a print progress dialog during the printing process.
If set to <code>true</code>, a dialog providing feedback on the printing progress is displayed to the user.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">usePrintingThread</span></td>
      <td><p>Determines whether the printing process should be executed on a separate thread. If set to <code>true</code>,
printing is performed on a background thread, which can help maintain UI responsiveness during the print operation.</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><p>Returns <code>true</code> if the print operation completes successfully; otherwise, returns <code>false</code>. A return value of <code>false</code>
may indicate that the user cancelled the print job or that an error occurred during printing.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method provides a flexible approach to printing section-based documents, allowing for user interaction through dialogs and improved application
performance by optionally running the print job on a separate thread. It is part of the GrapeCity ActiveReports printing extensions and is designed
to integrate seamlessly with the ActiveReports reporting components.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_SectionDocument_System_Boolean_System_Boolean_System_Boolean__examples">Examples</h5>
<pre><code class="lang-csharp">var doc = new SectionDocument();
doc.Load("C:\\Report.rdf");
doc.PrintOptions.PrintPageBorder = true;
doc.PrintOptions.Watermark = new WatermarkOptions
{
	Title = "Watermark",
	Angle = 45,
	Color = Color.Gray,
	Font = new Document.Drawing.Font("Arial", 72)
};
var result = doc.Print(false, true, false);</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument)">Print(PageDocument)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document with default settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The page document to print. This document contains the content and layout information for the print job.</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><p>Returns <code>true</code> if the print operation completes successfully; otherwise, returns <code>false</code>. A return value of <code>false</code>
may indicate that the user cancelled the print job or that an error occurred during printing.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method simplifies the printing process by using default settings, which include displaying the print dialog to the user,
showing a print progress dialog during the printing process, and executing the print job on a separate thread to maintain UI responsiveness.
It is designed for ease of use in common printing scenarios.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument__examples">Examples</h5>
<p>The following example demonstrates how to print a page document using the default settings:</p>
<pre><code class="lang-csharp">var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print();
if (printSuccess)
	Console.WriteLine("Printing completed successfully.");
else
	Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument,System.Boolean)">Print(PageDocument, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document, optionally displaying the print dialog.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument, bool showPrintDialog)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a> instance representing the document to be printed. This document contains the content
and layout information for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating whether the print dialog should be shown to the user before printing.
If set to <code>true</code>, the print dialog is displayed, allowing the user to modify printer settings such as the printer to use, the range of pages to print,
and the number of copies. If set to <code>false</code>, the document is printed directly with the current printer settings.</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><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating the success of the print operation. Returns <code>true</code> if the print operation completes
successfully; otherwise, returns <code>false</code>. A return value of <code>false</code> may indicate that the user cancelled the print job or that an error
occurred during the printing process.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method provides a simplified interface for printing page-based documents, with an option to display the print dialog for user interaction.
It defaults to showing the print progress dialog and executing the print job on a separate thread to maintain UI responsiveness.
This method is part of the GrapeCity ActiveReports printing extensions and is designed to integrate seamlessly with ActiveReports reporting components.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean__examples">Examples</h5>
<p>The following example demonstrates how to print a page document with the print dialog displayed:</p>
<pre><code class="lang-csharp">var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print(showPrintDialog: true);
if (printSuccess)
	Console.WriteLine("Printing completed successfully.");
else
	Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument,System.Boolean,System.Boolean)">Print(PageDocument, bool, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document, with options to display the print dialog and the print progress dialog.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument, bool showPrintDialog, bool showPrintProgressDialog)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a> instance representing the document to be printed. This document contains the content
and layout information for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating whether the print dialog should be shown to the user before printing.
If set to <code>true</code>, the print dialog is displayed, allowing the user to modify printer settings such as the printer to use, the range of pages to print,
and the number of copies. If set to <code>false</code>, the document is printed directly with the current printer settings.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintProgressDialog</span></td>
      <td><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating whether the print progress dialog should be shown during
the printing process. If set to <code>true</code>, the progress dialog is displayed, providing feedback about the printing status to the user.</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><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating the success of the print operation. Returns <code>true</code> if the print operation completes
successfully; otherwise, returns <code>false</code>. A return value of <code>false</code> may indicate that the user cancelled the print job or that an error
occurred during the printing process.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method provides a simplified interface for printing page-based documents, offering control over the display of the print dialog and the print
progress dialog. It defaults to executing the print job on a separate thread to maintain UI responsiveness. This method is part of the GrapeCity
ActiveReports printing extensions and is designed to integrate seamlessly with ActiveReports reporting components.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean__examples">Examples</h5>
<p>The following example demonstrates how to print a page document with both the print dialog and the print progress dialog displayed:</p>
<pre><code class="lang-csharp">var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
bool printSuccess = pageDocument.Print(showPrintDialog: true, showPrintProgressDialog: true);
if (printSuccess)
	Console.WriteLine("Printing completed successfully.");
else
	Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean_System_Boolean_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument,System.Boolean,System.Boolean,System.Boolean)">Print(PageDocument, bool, bool, bool)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document, providing options to display the print dialog, the print progress dialog,
and to execute the printing on a new thread.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument, bool showPrintDialog, bool showPrintProgressDialog, bool usePrintingThread)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a> instance to be printed. This document contains the content and layout information
for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintDialog</span></td>
      <td><p>Specifies whether the print dialog should be shown to the user. If set to <code>true</code>, the print dialog allows the user
to modify printer settings such as the printer to use, the range of pages to print, and the number of copies. If <code>false</code>, the document is printed
directly with the current printer settings without user interaction.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">showPrintProgressDialog</span></td>
      <td><p>Specifies whether the print progress dialog should be displayed during the printing process.
If set to <code>true</code>, the progress dialog provides feedback about the printing status to the user. If <code>false</code>, no progress dialog is shown.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a></td>
      <td><span class="parametername">usePrintingThread</span></td>
      <td><p>Determines whether the printing process should be executed on a new thread. Using a separate thread for printing
can help maintain UI responsiveness during the print job. If set to <code>true</code>, the printing is performed on a new thread; if <code>false</code>,
it is performed on the current thread.</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><p>Returns <code>true</code> if the print operation completes successfully; otherwise, returns <code>false</code>. A return value of <code>false</code> may indicate
that the user cancelled the print job or that an error occurred during the printing process.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean_System_Boolean__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method is designed to provide a flexible and user-friendly interface for printing page-based documents within the GrapeCity ActiveReports framework.
It allows for customization of the printing process through various parameters, catering to different user preferences and requirements.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_System_Boolean_System_Boolean_System_Boolean__examples">Examples</h5>
<pre><code class="lang-csharp">var report = new PageReport(new FileInfo(@"C:\Report.rdlx"));
var doc = report.Document;
doc.PrintOptions.Watermark = new WatermarkOptions
{
	Title = "Watermark",
	Angle = 45,
	Color = Color.Red,
	Font = new Font("Arial", 72),
	DrawOver = true
};
var result = doc.Print(false, true, false);</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_Viewer_Common_PrintingSettings_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument,GrapeCity.Viewer.Common.PrintingSettings)">Print(PageDocument, PrintingSettings)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document, allowing for detailed control over the printing settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument, PrintingSettings printingSettings)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a> instance representing the document to be printed. This document contains the content
and layout information for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.Viewer.Common.PrintingSettings.html">PrintingSettings</a></td>
      <td><span class="parametername">printingSettings</span></td>
      <td><p>A <a class="xref" href="GrapeCity.Viewer.Common.PrintingSettings.html">PrintingSettings</a> enumeration that specifies the printing options such as whether to show the print dialog,
the print progress dialog, use a printing thread, and the style of the dialog. This allows for granular control over the printing process.</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><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating the success of the print operation. Returns <code>true</code> if the print operation completes
successfully; otherwise, returns <code>false</code>. A return value of <code>false</code> may indicate that the user cancelled the print job or that
an error occurred during the printing process.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_Viewer_Common_PrintingSettings__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method provides an advanced interface for printing page-based documents within the GrapeCity ActiveReports framework,
leveraging the <a class="xref" href="GrapeCity.Viewer.Common.PrintingSettings.html">PrintingSettings</a> enumeration to customize the printing experience. It is designed to cater to various printing
preferences and scenarios, offering flexibility in how the print job is executed.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_Viewer_Common_PrintingSettings__examples">Examples</h5>
<p>The following example demonstrates how to print a page document with customized printing settings:</p>
<pre><code class="lang-csharp">var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
PrintingSettings settings = PrintingSettings.UseStandardDialog | PrintingSettings.ShowPrintDialog;
bool printSuccess = pageDocument.Print(settings);
if (printSuccess)
    Console.WriteLine("Printing completed successfully.");
else
	Console.WriteLine("Printing failed.");</code></pre>



<a id="GrapeCity_ActiveReports_PrintExtension_Print_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print*"></a>
<h4 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_ActiveReports_PrinterSettings_" data-uid="GrapeCity.ActiveReports.PrintExtension.Print(GrapeCity.ActiveReports.Document.PageDocument,GrapeCity.ActiveReports.PrinterSettings)">Print(PageDocument, PrinterSettings)</h4>
<div class="markdown level1 summary"><p>Initiates the printing process for a page-based document using specified printer settings.</p>
</div>
<div class="markdown level1 conceptual"></div>
<h5 class="declaration">Declaration</h5>
<div class="codewrapper">
  <pre><code class="lang-csharp hljs">public static bool Print(this PageDocument pageDocument, PrinterSettings printerSettings)</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="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a></td>
      <td><span class="parametername">pageDocument</span></td>
      <td><p>The <a class="xref" href="../MESCIUS.ActiveReports/GrapeCity.ActiveReports.Document.PageDocument.html">PageDocument</a> instance representing the document to be printed. This document contains the content
and layout information for the print job.</p>
</td>
    </tr>
    <tr>
      <td><a class="xref" href="GrapeCity.ActiveReports.PrinterSettings.html">PrinterSettings</a></td>
      <td><span class="parametername">printerSettings</span></td>
      <td><p>An instance of <a class="xref" href="GrapeCity.ActiveReports.PrinterSettings.html">PrinterSettings</a> that specifies the settings to be used for the print job, including whether
to show the print dialog, the print progress dialog, whether to use a printing thread, and details about the printer configuration.</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><p>A <a class="xref" href="https://learn.microsoft.com/dotnet/api/system.boolean">bool</a> value indicating the success of the print operation. Returns <code>true</code> if the print operation completes
successfully; otherwise, returns <code>false</code>. A return value of <code>false</code> may indicate that the user cancelled the print job or that an error
occurred during the printing process.</p>
</td>
    </tr>
  </tbody>
</table>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_ActiveReports_PrinterSettings__remarks">Remarks</h5>
<div class="markdown level1 remarks"><p>This method provides a flexible interface for printing page-based documents within the GrapeCity ActiveReports framework,
leveraging the <a class="xref" href="GrapeCity.ActiveReports.PrinterSettings.html">PrinterSettings</a> class to customize the printing experience. It allows for detailed control over the printing process,
catering to various user preferences and scenarios.</p>
</div>
<h5 id="GrapeCity_ActiveReports_PrintExtension_Print_GrapeCity_ActiveReports_Document_PageDocument_GrapeCity_ActiveReports_PrinterSettings__examples">Examples</h5>
<p>The following example demonstrates how to print a page document with custom printer settings:</p>
<pre><code class="lang-csharp">var pageReport = new PageReport();
PageDocument pageDocument = new PageDocument(pageReport);
PrinterSettings printerSettings = new PrinterSettings
{
    ShowPrintDialog = true,
    ShowPrintProgressDialog = true,
    UsePrintingThread = true,
    UseStandardDialog = true
};
bool printSuccess = pageDocument.Print(printerSettings);
if (printSuccess)
    Console.WriteLine("Printing completed successfully.");
else
	Console.WriteLine("Printing failed.");</code></pre>

<h5 class="exceptions">Exceptions</h5>
<table class="table table-bordered table-condensed">
  <thead>
    <tr>
      <th>Type</th>
      <th>Condition</th>
    </tr>
  </thead>
  <tbody>
    <tr>
      <td><a class="xref" href="https://learn.microsoft.com/dotnet/api/system.argumentnullexception">ArgumentNullException</a></td>
      <td><p>Thrown when <code class="paramref">printerSettings</code> is null.</p>
</td>
    </tr>
  </tbody>
</table>
</div>
