sohotcall

Raw Printing Linux

Jul 15th, 2020
99
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. Melihat daftar printer
  2. $ lpstat -p -d
  3.  
  4. Print file test.txt ke printer LQ-2190
  5. $ lp -d LQ-2190 -o raw test.txt
  6.  
  7. Print string ke printer
  8. $ echo "Some string" | lp -d LQ-2190
  9.  
  10. Set paper size
  11. $ lp -o media=Custom.24.13x9.32in -o raw test.txt
  12.  
  13. Escape code
  14. 1B 21 01: font B
  15. 1B 'M':
  16. 0E: format bold
  17. 0F: clear format
  18. 1B C1 0B: 11 dot perline
  19. $ echo -n -e "\x1B\x21\x01\x1BM\x0F\x1B\xC1\x0BHello, world!\x0D\x0A" | lp -d LQ-2190 -o raw
RAW Paste Data