Delphi Programming Forum
C++Builder  |  Delphi  |  FireMonkey  |  C/C++  |  Free Pascal  |  Firebird
볼랜드포럼 BorlandForum
 경고! 게시물 작성자의 사전 허락없는 메일주소 추출행위 절대 금지
델파이 포럼
Q & A
FAQ
팁&트릭
강좌/문서
자료실
컴포넌트/라이브러리
FreePascal/Lazarus
볼랜드포럼 홈
헤드라인 뉴스
IT 뉴스
공지사항
자유게시판
해피 브레이크
공동 프로젝트
구인/구직
회원 장터
건의사항
운영진 게시판
회원 메뉴
북마크
델마당
볼랜드포럼 광고 모집

델파이 Q&A
Delphi Programming Q&A
[10103] [질문] RS232C(Serial) 단말기에 이미지를 출력하고자 합니다.
김길남 [] 1346 읽음    2005-06-05 20:35
영수증 프린터가 있습니다.
Com1에 연결해서 사용하는 Serial 프린터입니다.
컴포넌트는 Cport를 사용합니다.

Text문자들은 출력할수 있습니다.
그러나 제가 원하는 건 image mode에서 출력하는 걸 원합니다.
문자열은 물론이고 이미지화일까지 출력하고자 합니다.
단말기 제조업체에서 제공받은 command에는
ESC * 명령으로 이미지를 출력한다는 것을 알았습니다.
내용을 읽어보면 대충 무슨 내용인지는 알겠는 데... 어디부터 시작해야 할 지 감이 오질 않습니다.

다음은 단말기 제조업체에서 받은 명령어 내용입니다.
내용이 좀 길지만...끝까지 보시고 제게 도움을 주셨으면 감사하겠습니다.

그럼 즐코하세요.

ESC *m nL nH [d1...dk]
[Name]        Select bit-image mode
[Format]        ASCII   ESC  * m nL nH[d1...dk]
Hex    1B    2A m nL nH[d1...dk]
[Range]        m = 0, 1, 32, 33
0≤nL ≤255
0≤nH ≤3
0≤d ≤255
[Description]
Selects bit-image mode using m for the number of dots specified by (nL+ nH,x256).
This command is used to print a predefined picture or logo.
The modes selectable by m are follows;
---------------------------------------------------------------------------------------------------------
m   |  Mode                        | Vertical  Direction |        Horizontal Direction
     |                                   |--------------------------------------------------------------------
     |                                   | NO. of |  Dot        | DotDensity | Number of (Data(K)
     |                                   | Dots    | Density  |                   |
----------------------------------------------------------------------------------------------------------
0    | 8-dot single-density    |    8       | 60 DPI    | 90 DPI        | nL + nH x 256
1    | 8-dot double-density   |    8       | 60 DPI    | 180 DPI       | nL + nH x 256
32  | 24-dot single-density   |    24      | 180 DPI  | 90 DPI        | (nL + nH x 256) x 3
33  | 24-dot double-density  |    24      | 180 DPI  | 180 DPI       | (nL + nH x 256) x 3
----------------------------------------------------------------------------------------------------------

[Notes]       
The nL and nH indicate the number of dots of the bit image in the
horizontal direction.
The number of dots is calculated by nL + nH x 256.
If the bit-image data input exceeds the number of dots to be printed on a line, the excess  data is ignored.
d indicates the bit-image data.
Set a corresponding bit of 1 to print a dot or to 0 to not print a dot.
If the value of m is out of the specified range, nL and data following are processed as normal data.
If the width of the printing area set by “GS L” and “GS W” less than the width required by the data sent with the “ESC *” command the following will be performed on the line in question (but the printing cannot exceed the maximum printable area) :
① The width of the printing area is extended to the right to accommodate the amount of data.
② If step ① does not provide sufficient width for the data, the left margin is reduced to accommodate the data.
For each bit of data in single-density mode, the printer prints two dots : for each bit of data in double-density mode, the printer prints one dot.
This must be considered in calculating the amount of data that can be printed in one line.
After printing a bit images the printer returns to normal data processing mode.
This command is not affected by print modes (emphasized, double-strike, and underline etc.), except upside-down mode.

+ -

관련 글 리스트
10103 [질문] RS232C(Serial) 단말기에 이미지를 출력하고자 합니다. 김길남 1346 2005/06/05
Google
Copyright © 1999-2015, borlandforum.com. All right reserved.