Spire.PDF is a professional PDF library applied to creating, writing, editing, handling and reading PDF files without any external dependencies. Get free and professional technical support for Spire.PDF for .NET, Java, Android, C++, Python.

Wed May 27, 2015 2:37 pm

I am using Spire.PDF C# and trying to print one document to multiple tray ( each page to different Tray) in same print job , i cant find a way to do that

liorklein@gmail.com
 
Posts: 1
Joined: Wed May 27, 2015 12:18 pm

Thu May 28, 2015 7:31 am

Hello,

Thanks for your inquiry.
Sorry that at present the Spire.PDF doesn’t support to print one document to multiple trays in same print job.

Best Regards,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Thu Aug 20, 2015 7:07 am

Hello,

The Spire.PDF Pack Version: 3.5 has been released, in which the new feature you mentioned has been done. If this doesn’t meet your requirement, please let us know, we will adjust our product accordingly. Here is test code for your reference.
Code: Select all
            PdfDocument doc = new PdfDocument();
            doc.LoadFromFile(@"D:\Work\Test\task\201505\MoonlightShadow.pdf");
            PrinterSettings.PaperSourceCollection collections = doc.PrintDocument.PrinterSettings.PaperSources;
            List<PdfPaperSourceTray> loPaperSources = new List<PdfPaperSourceTray>();
            if (loPaperSources.Count >= 4)
            {
                PdfPaperSourceTray tray = new PdfPaperSourceTray();
                tray.StartPage = 0;
                tray.EndPage = 1;
                tray.PrintPaperSource = collections[2];
                loPaperSources.Add(tray);
                PdfPaperSourceTray tray1 = new PdfPaperSourceTray();
                tray1.StartPage = 2;
                tray1.EndPage = 3;
                tray1.PrintPaperSource = collections[3];
                loPaperSources.Add(tray);
            }
            else
            {
                for (int i = 0; i < collections.Count; i++)
                {
                    PdfPaperSourceTray tray = new PdfPaperSourceTray();
                    tray.StartPage = i * 2;
                    tray.EndPage = (i + 1) * 2;
                    tray.PrintPaperSource = collections[i];
                    loPaperSources.Add(tray);
                }
            }
            doc.PageSettings.ListPaperSourceTray = loPaperSources;
            doc.PrintDocument.Print();


Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Mon Aug 24, 2015 8:25 am

Hello,

Have you tried the method ? Has it met your requirement ?
Thanks for your feedback.

Sincerely,
Betsy
E-iceblue support team
User avatar

Betsy
 
Posts: 802
Joined: Mon Jan 19, 2015 6:14 am

Return to Spire.PDF