> Hi,
> I'm got Epson TMJ2100 POS printer and want to use it with sql-ledger for

This is the ledger-smb list :)

> printing POS receipts. Printer got parallel interface and I'm able to print
> receipts. My question is, is anybody could give me some hints how to
> include printer control commands into pos_invoice.txt template?
> I want to include Company logo and manipulate look of receipts.
> Printer is capable to print images and colour.

I can't get to any manuals on pos.epson.com w/o registering, so I'm only 
guessing here.

I bet you need to somehow embed "\e" (not backslash & 'E', but  chr(27)) into 
the pos_invoice.txt file. You can try:

perl  -e 'print "\e"' >> pos_invoice.txt

from a linux command line.  This will append one escape character to the 
pos_invoice.txt file, which you can copy and paste around to compose your 
escape sequences.

I did manage to find:
http://www.datamaxcorp.com/_assets/library/pdf/e3202_esc_pos_programmers_manual_d.pdf
Which seems to summarize the escape codes available in ESC/POS.

Also, it seems ghostscript supports ESC/POS as well.

Convert your image to ps,  (try the netpbm tools: pngtopnm < file.png | 
pnmtops > outputps.ps)

then try:

gs -sOutputFile=outfile.escpos -sDEVICE=escp outputps.ps

and keep hitting enter (should only be once, I hope)

place the contents of outfile.escpos in your pos_invoice.txt file, and i 
*think* it should work.

Hopefully this is enough info to get you going.  I don't have any POS printers 
to confirm that any of this works, this is just from doing a bit of research.

Jason

Attachment: pgpa38vGJ2MdT.pgp
Description: PGP signature

-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
Ledger-smb-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/ledger-smb-devel

Reply via email to