PdfPrint library has support for papersources.
private static PaperSource GetPaperSource(PrinterSettings printerSettings, string paperSourceName)
{
foreach (PaperSource paperSource in printerSettings.PaperSources)
{
if (paperSource.ToString().Equals(paperSource))
{
return paperSource;
}
}
return null; // Paper source not found
}
var pdfprint = new PdfPrint("your company name", "your key");
var printerSettings = new PrinterSettings();
pdfPrint.PaperSource = GetPaperSource("name of your input tray"); // it is case sensitive
PdfPrint library doesn't have support for output trays.
.NET PrinterSettings class has property for setting PaperSource and PaperSource is standard setting.
Output trays aren't standard printer property - and every printer which supports it handle it differently so it isn't possible to have one general solution which will work for every printer.
So what to do if you want to print to specific output tray?
Only option is that you use property SettingDialog to show Printer settings dialog.
If not set through SettingDialog, printer default output tray will be used.