Auto cut on thermal printer (php) -


how can perform auto cut on epson tmt82 php file? bellow config file.

config:

$tmpdir = sys_get_temp_dir(); $file = tempnam($tmpdir, 'ctk'); $handle = fopen($file, 'w'); $condensed = chr(27) . chr(33) . chr(4); $bold1 = chr(27) . chr(69); $bold0 = chr(27) . chr(70); $initialized = chr(27) . chr(64); $condensed1 = chr(15); $condensed0 = chr(18); $data = $initialized; $data .= $condensed1; 

printing:

fwrite($handle, $data); fclose($handle); copy($file, "//localhost/printer");  # printing unlink($file) 

try write chr(29) + 'v' (or chr(86)), , values m , n, depending on exact function want use per manual below (if want cut without feeding @ all, want use function a, means can follow 0 (or 48, not sure why mentioned both numbers in manual...!?), so:

chr(29) . "v" . 0

https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=87

(you need logged on read reference, registering free)

edited: chr() code 'v' 86, not 56

edit2: comment on matt gibson said; chr(27) . chr(105) should work on model (just checked, chr(27) . chr(109)), it's obsolete command, should using chr(29) . "v". in case, printers receive these sorts of commands on own instead of having them along rest of string.

once right, should define variable type of cut want. ex. $cutpaper = chr(29) . "v" . 0;


Comments

Popular posts from this blog

android - InAppBilling registering BroadcastReceiver in AndroidManifest -

python Tkinter Capturing keyboard events save as one single string -

sql server - Why does Linq-to-SQL add unnecessary COUNT()? -