Raj*_*ahu 13 c# printing wpf flowdocument
我只想知道如何打印流文档而不在WPF中显示Print Dialog.
感谢帮助…
el_*_*yan 16
这是您可以更改默认打印机或更改其他设置的方法之一:
using System.Printing; //add reference to System.Printing Assembly
//if you want to modify PrintTicket, also add
//reference to ReachFramework.dll (part of .net install)
...
var dlg = new PrintDialog();
dlg.PrintQueue = printer; // this will be your printer. any of these: new PrintServer().GetPrintQueues()
dlg.PrintTicket.CopyCount = 3; // number of copies
dlg.PrintTicket.PageOrientation = PageOrientation.Landscape;
dlg.PrintVisual(canvas);
Run Code Online (Sandbox Code Playgroud)
| 归档时间: |
|
| 查看次数: |
15693 次 |
| 最近记录: |