2010-06-08 5 views

답변

13

당신은

2

이 변경할 수있는 방법 중 하나입니다

PrintDialog dialog = new PrintDialog(); 
dialog.PrintVisual(_PrintCanvas, "My Canvas"); 
13

시도 (ShowModal를 호출하지 않고) 대화 상자를 표시하지 않고 PrintDialog 클래스를 사용할 수 있습니다 기본 프린터 또는 기타 설정 변경 :

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); 
+2

불행히도 파일로 인쇄하려고하면 로그, 누구든지 파일 인쇄를위한 해결책을 알고 있습니까? – Beno

관련 문제