2012-07-10 2 views
2

안녕하세요 저는 시스템에 Star TSP100 Cutter (TSP143) 프린터 드라이버를 설치하고 프린터를 테스트하여 모든 것을 인쇄했습니다. 하지만 이제는 C# 코드로 잘라 내기 용지, Open Printer, Print 일반 등의 코드를 통해 프린터를 처리하려고합니다. 아래 코드를 사용하여 프린터를 인스턴스화했습니다. 프린터를 쿼리 할 때 null을 반환합니다.pos explorer가 C#에서 시스템에 연결된 장치를 찾지 못했습니다.

내가 잘못 될 경우 제안이나 도움을주십시오. 감사합니다.

public static DeviceCollection GetPrinters() 
    { 
     PosExplorer explorer = new PosExplorer(); 
     return explorer.GetDevices(DeviceType.PosPrinter, DeviceCompatibilities.OposAndCompatibilityLevel1); 
    } 

    public static DeviceInfo GetPrinter(string name) 
    { 
     if (String.IsNullOrEmpty(name)) 
      return null; 

     PosExplorer explorer = new PosExplorer(); 
     return explorer.GetDevice(DeviceType.PosPrinter, name); 
    } 
PosExplorer explorer = null; 
       DeviceInfo device = null; 
       PosPrinter printer = null; 
       DeviceCollection printers = GetPrinters(); 

       DeviceInfo printers2 = GetPrinter("Star TSP100 Cutter (TSP143)"); 

답변

1

잘못된 명령이 전송되는 것 같습니다. TSP100은 Star의 라인업에있는 나머지 프린터와 다릅니다. 래스터 명령을 받아야합니다. 다른 프린터는 일반적으로 기본적으로 회선 모드를 사용합니다. 여기

참조 자신의 프로그래밍 매뉴얼 : http://www.starmicronics.com/support/Mannualfolder/linemode_cm_en.pdf

페이지 87 : 현금 서랍

페이지 92 : 피드/내가 해결 한

+0

잘라 어떻게

페이지 90 래스터 모드를 초기화 표시 .Net v1.12 용 POS를 재설치하여 문제를 해결했습니다. 이제 프린터를 찾았지만 논리적으로 .. 이제 프린터를 시스템에 연결하고 해당 프린터의 드라이버를 설치했습니다. POS 탐색기를 사용하여 물리적으로 어떻게 인쇄 할 수 있습니까? –

관련 문제