Click here to Skip to main content
15,887,683 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
C#
string strPrintFile = "D:\\Application2.pdf";
               ConvertImageToPdf(arrayFile, strPrintFile);
               ProcessStartInfo info = new ProcessStartInfo(strPrintFile);
               info.Verb = "Print";
               info.CreateNoWindow = true;
               info.WindowStyle = ProcessWindowStyle.Hidden;
               //fs.Close();
               Process.Start(info);



I m using this code to print a document.
this is working perfect.

now i want to print a document with Duplex printing.
which code should i do in above code?
Posted
Comments
Michael_Davies 23-Jan-16 3:41am    
Duplex printing is a feature of the printer, not all printers support it.

You are not controlling the printing of the document, you are telling the system to print it which means it will be printed on the default printer using the settings set by the user for that printer.

Therefore your only option is to have the user set the printer to duplex by default, which means every print will duplex.

1 solution

This "
C#
System.Drawing.Printing

" library can help you. PrinterSettings.CanDuplex can help you can check if the printer is duplex. then use PrinterSettings.Duplex.
It is all in PrinterSettings.Duplex Property (System.Drawing.Printing)[^] and [^] all is in mdsn
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900