Splitting the pages to different trays

Skip Navigation LinksHome  /  Support  /  Forums  /  DynamicPDF PrintManager for .NET (v4)  /  Re: Splitting the pages to different trays

DynamicPDF PrintManager for .NET (v4) Forum

We are trying to send the same PDF, page 1 to a tray and all other pages to another tray. This doesn't seem to work to well.

public void PrintAllPdfUsingOneDoc()
{
                //Convert Pdf content to Pdf doc
                ceTe.DynamicPDF.Printing.InputPdf _pdfDoc = new ceTe.DynamicPDF.Printing.InputPdf(_printConfig.PDFContent);
                _pageCount = _pdfDoc.Pages.Count;

                //Create a print job for check page
                var _printer = new Printer(_printConfig.CheckPrinterName);
                var _checkPaperSource = _printer.PaperSources.FirstOrDefault(x => x.Name == _printConfig.CheckPaperSource.SourceName);
                var _tailPaperSource = _printer.PaperSources.FirstOrDefault(x => x.Name == _printConfig.TailPaperSource.SourceName);
                ceTe.DynamicPDF.Printing.PrintJob _printJob = new ceTe.DynamicPDF.Printing.PrintJob(_printer, _pdfDoc);

                _printJob.PrintOptions.PaperSource = _tailPaperSource;

                ////PrintOptions for the check page
                _printJob.Pages[0].PrintOptions.Inherit = false;
                _printJob.Pages[0].PrintOptions.PaperSource = _checkPaperSource;

                if(_pageCount > 1)
                {                   
                        //PrintOptions for the tail pages
                        for (int i = 1; i < _pageCount; i++)
                        {
                                _printJob.Pages[i].PrintOptions.Inherit = false;
                                _printJob.Pages[i].PrintOptions.PaperSource = _tailPaperSource;
                        }
                }
                _printJob.Print();
                _log.Info(string.Format("Check page printing at printer: {0} using tray: {1} with JobID: {2}", _printJob.Printer.Name.ToString(), _printJob.PrintOptions.PaperSource.Name.ToString(), _printJob.JobId));
                _printJob.Dispose();
}

Any suggestions?
Posted by a ceTe Software moderator
Hi,

We have tested this on our end and the code looks good. Our API is sending the specified values to the respective printer driver, and it looks like the printer driver is not picking these settings.   We are not sure why the printer driver is not setting the specified attributes which is outside the bounds of DynamicPDF PrintManager product.

DynamicPDF PrintManager just sends the printjob to the respective printer driver and it is up to the driver to handle the printing. 

Thanks,
ceTe Software Support Team

All times are US Eastern Standard time. The time now is 8:12 PM.