How to print document both side

余生颓废 提交于 2019-12-19 09:53:18

问题


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


回答1:


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

Perhaps you can use the Duplex-property?




回答2:


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();


来源:https://stackoverflow.com/questions/9580032/how-to-print-document-both-side

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!