[]
        
(Showing Draft Content)

GrapeCity.Documents.Excel.PrintOutOptions.PaperSourceName

PaperSourceName Property

PaperSourceName

Gets or sets the name of the paper source (input tray) used for printing.

Declaration
public string PaperSourceName { get; set; }
Public Property PaperSourceName As String
Property Value
Type Description
string

The name of the paper source. The default is null, which uses the printer's default tray. The name must match one of the paper source names reported by the target printer driver (case-insensitive).

Remarks
<p>

Common paper source names include "Tray 1", "Tray 2", "Bypass Tray", "Auto Select", etc. Available names vary by printer model and driver. You can query available paper sources using System.Drawing.Printing.PrinterSettings.PaperSources.

    <pre><code class="lang-csharp">PrintOutOptions options = new PrintOutOptions();
    options.ActivePrinter = "HP LaserJet Pro";
    options.PaperSourceName = "Tray 2";
    worksheet.PrintOut(options);</code></pre>
</example>
Exceptions
Type Condition
ArgumentException

Thrown when the specified paper source name is not found for the target printer.