Set Printer Settings to Duplex

Technical support for Spire.PDFViewer

Moderator: iceblue support

Set Printer Settings to Duplex

Postby yzou79 » Fri Jul 22, 2016 6:50 pm

Can Spire.PDFViewer or other component control printer's duplex setting. I would like to dynamically set duplex settings based on the PDF file name. Some files print as Singleplex and others as duplex.
yzou79
 
Posts: 2
Joined: Fri Jul 22, 2016 5:50 pm

Re: Set Printer Settings to Duplex

Postby Betsy » Mon Jul 25, 2016 2:43 am

Hi,

Thanks for your interests in our products.
Spire.PDFViewer supports to set printer settings to duplex, here is sample code for your reference:
Code: Select all
            //Indicate whether the printer supports duplex
            bool value =  this.pdfDocumentViewer1.PrintDocument.PrinterSettings.CanDuplex;
            //If so, set the printer's duplex setting: Default, Simplex, Horizontal, Vertical
            this.pdfDocumentViewer1.PrintDocument.PrinterSettings.Duplex = System.Drawing.Printing.Duplex.Simplex;
            this.pdfDocumentViewer1.PrintDocument.Print();

Also, the Spire.PDF also supports the feature, the code is similar with the code above.
If there is any question, welcome to get it back to us.

Sincerely,
Betsy,
E-iceblue support team
User avatar
Betsy
 
Posts: 804
Joined: Mon Jan 19, 2015 6:14 am

Re: Set Printer Settings to Duplex

Postby yzou79 » Mon Jul 25, 2016 2:53 pm

Thanks for your reply.

I use the demo solution "VBDemos-VS2010" to run a test. The duplex printing works OK with one issue. The first page is always printed blank no matter I use duplex or simplex. I tried different PDF. The first page printed is always blank. In one instance, blank page is printed randomly in other pages too.

By the way, I will use commercial copy of Spire.PDFViewer once I test it OK. Can I get a copy of the commercial edition to see if it has the same problem (blank printed page)

Thanks
yzou79
 
Posts: 2
Joined: Fri Jul 22, 2016 5:50 pm

Re: Set Printer Settings to Duplex

Postby Betsy » Tue Jul 26, 2016 1:56 am

Hi,

Thanks for your feedback.
Please try to use the commercial latest Spire.PDFViewer Pack Version:2.10, if the issue persists, please provide us the sample document to help us do the investigation.
Also, you can contact our sales team(sales@e-iceblue.com) to get a temporary license file for one month to remove the warning message and have a better evaluation on our products.

Sincerely,
Betsy
E-iceblue support team
User avatar
Betsy
 
Posts: 804
Joined: Mon Jan 19, 2015 6:14 am


Return to Spire.PDFViewer

Who is online

Users browsing this forum: No registered users and 1 guest

cron