Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to print document both side

Tags:

c#

I have one command line application which print word document. As per new requirement, whenever application send document for printing, it should print both side.

So my question is, can I set in my C# program any printing property which send command to printer for print both side instead of doing manual with printer.

please advice thanks

like image 951
SeeSharp Avatar asked Oct 19 '25 12:10

SeeSharp


2 Answers

http://msdn.microsoft.com/en-us/library/system.drawing.printing.printersettings.aspx

Perhaps you can use the Duplex-property?

like image 54
ahdaniels Avatar answered Oct 21 '25 03:10

ahdaniels


Here's a simple piece of code to print with some settings:

var pd = new PrintDocument
{
    PrinterSettings =
    {
        Duplex = Duplex.Vertical,
        PrinterName = "YourPrinterName"
    }
};

if(pd.PrinterSettings.IsValid)
    pd.Print();
like image 43
Abbas Avatar answered Oct 21 '25 03:10

Abbas



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!