Hi Jens,
Hi Jens,
Thanks for your inquiry. As per my understanding you want to set a source paper tray. Please check following code snippet for the purpose, you need to set PaperSource property of PageSetting object. Please also check Aspose.Pdf printing options and sample code snippet to use subjected properties.
Moreover, If there is any difference in my understanding and your requirement then please share some more details about your requirement. So we will look into it and guide you accordingly.
//create objects for printer and page settings and PrintDocument
System.Drawing.Printing.PrinterSettings ps = new System.Drawing.Printing.PrinterSettings();
System.Drawing.Printing.PageSettings pgs = new System.Drawing.Printing.PageSettings();
//specify your printer name
ps.PrinterName = myPrinterName;
ps.PrintRange = PrintRange.SomePages;
ps.FromPage = 1;
ps.ToPage = 2;
//set PageSize (if required)
pgs.PaperSize = new System.Drawing.Printing.PaperSize(“A4”, 827, 1169);
//set PageMargins (if required)
pgs.Margins = new System.Drawing.Printing.Margins(0, 0, 0, 0);
//Here you can set the PaperSource which you want to use as per your printer.
pgs.PaperSource = ps.PaperSources[1];
//print document using printer and page settings
viewer.PrintDocumentWithSettings(pgs, ps);
Please feel free to contact us for any further assistance.
Best Regards,
Hello,
Hi Jens,
The issues you have found earlier (filed as PDFNET-38233) have been fixed in Aspose.PDF for .NET 24.7. This message was posted using Bugs notification tool by asad.ali