Use Code to Cut Paper(200分)

  • 主题发起人 主题发起人 jack21cn
  • 开始时间 开始时间
J

jack21cn

Unregistered / Unconfirmed
GUEST, unregistred user!
when i print in my Star SP300 printer(have auto cutting function),
it not auto cut paper, I have the Auto Cutting control codes,
butdo
not know how to use, please give me the way(source code),
thanks very much!

Auto Cutting Control Codes(from printer Manuals) :
<ESC>"d" "0" or <ESC>"d" <0>
<ESC>"d" "1" or <ESC>"d" <1>
 
search send RAW data to printer
It use win api send RAW data direct to printer, include printer control code
 
jack21cn:如果还想接着讨论请定期提前自己的帖子,如果不想继续讨论请结束帖子。
 
用 Escape 函数应该可以:
The Escape function allows applications to access capabilities of a particular
device not directly available through GDI. Escape calls made by an application
are translated and sent to the driver.

int Escape(
HDC hdc, // handle to device context
int nEscape, // escape function
int cbInput, // number of bytes in input structure
<font color = #ff0000><strong>LPCSTR lpvInData, // pointer to input structure </font></strong>
LPVOID lpvOutData // pointer to output structure
);
 
接受答案了.
 

Similar threads

后退
顶部