I would like to print a PdfDocument object to the middle tray (2), but when the below code runs the very first page always prints from the top tray (1) and then the following pages are printed from the middle tray (2). I've played around with the start/end page parameters but no luck. Not sure where i'm going wrong
- Code: Select all
var loPaperSources = new List<PdfPaperSourceTray>();
var collections = doc.PrintDocument.PrinterSettings.PaperSources;
loPaperSources.Add(new PdfPaperSourceTray
{
StartPage = 0,
EndPage = doc.Pages.Count-1,
PrintPaperSource = collections[2]//middle tray
});
doc.PageSettings.ListPaperSourceTray = loPaperSources;
doc.PrintDocument.Print();
Also is Spire capable of printing multiple PdfDocument objects in one batch while printing to multiple trays. i.e. Merge two documents together then print pages 1-2 from tray 1, print pages 3-4 from tray 2 then print page 5 from tray 1 again?
Thanks