I can successfully use the code below to print from server side code in ASP.NET to the named local printer (the server has multiple local printers and I cannot set this one to be the default printer).
using (var stream = new FileStream(fileName, FileMode.Open))
using (var viewer = new Aspose.Pdf.Facades.PdfViewer())
viewer.AutoResize = true;
viewer.AutoRotate = true;
viewer.PrintPageDialog = false;
var printerSettings = new System.Drawing.Printing.PrinterSettings();
printerSettings.PrinterName = “my printer name”;
In the particular case, it seems to use all of the printer settings with the exception of the proper output bin. It always sends it to the top bin instead of the left bin defined in the printer properties on the server. Printing a test page from the windows dialog in Devices and Printers sends the test page to the proper left bin. So, I know I have the local printer set up correctly.
I don’t see a setting in the PrintSettings class for output bin. Is the use of this class to define the printer name forcing this to print out to the top bin by default?
Hoping you folks could shed some light on the issue for me.