2010-02-01 5 views
2

PosPritnter 클래스의 속성을 설정할 수 없습니다. 예를 PageModeStation, PageModeVerticalPosition, PageModePrintArea를 들어 등POS For .NET : PosPrinter의 속성 속성을 설정하지 못했습니다.

PosPrinter posPrinter = (PosPrinter)posExplorer.CreateInstance(posPrinterInfo); 
posPrinter.Open(); 
posPrinter.Claim(1000); 
posPrinter.DeviceEnabled = true; 
posPrinter.PageModeVerticalPosition = 10; //<--- Exception thrown: Failed to set property PageModeVerticalPosition 

예외 정보 :

Microsoft.PointOfService.PosControlException was unhandled 
    Message="Failed to set property PageModeVerticalPosition." 
    Source="Microsoft.PointOfService" 
    ErrorCodeExtended=0 
    StackTrace: 
      at Microsoft.PointOfService.Legacy.LegacyProxy.SetProperty(String propertyName, Object propertyValue) 
      at Microsoft.PointOfService.Legacy.LegacyPosPrinter.set_PageModeVerticalPosition(Int32 value) 
     .... 

어떤 제안이?

답변

0

프린터가 지원하는 가정, 당신은 아마 수행해야합니다 1 - 페이지 모드

posPrinter.PageModePrint(PageModePrintControl.PageMode); 

2를 사용 - 인쇄 영역을 정의합니다.

posPrinter.PageModePrintArea = new Rectangle(0, 0, posPrinter.PageModeArea.X, posPrinter.PageModeArea.Y); 

해당 속성을 설정하기 전에.

+0

여기 내 질문을 확인해 주시겠습니까? http://stackoverflow.com/questions/12408057/pos-for-net-print-formatting-cant-use-escape-character-char27#comment16677149_12408057 Microsoft POSPrinter Simulator는 모든 종류의 서식 (굵게, 텍스트 맞춤 등)을 갖습니다. 내 실제 POS 프린터에서 작동하지 않습니다. –

관련 문제