[]
Gets or sets the name of the paper source (input tray) used for printing.
public string PaperSourceName { get; set; }
Public Property PaperSourceName As String
| 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). |
<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>
| Type | Condition |
|---|---|
| ArgumentException | Thrown when the specified paper source name is not found for the target printer. |