Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Boneco do Extrato do CF-e (Cupom Fiscal eletrônico) para o SAT-CF-e
# Depende de PyESCPOS (https://github.com/base4sistemas/pyescpos)
# Testado em uma Daruma DR700 L-e v01.21.00
# Resultado: https://plus.google.com/105886422423352640759/posts/YBedvhKL8SQ?pid=6131402497594282098&oid=105886422423352640759
from escpos.serial import SerialSettings
from escpos.impl.daruma import DarumaGeneric
conn = SerialSettings.as_from('COM1:9600,8,1,N').get_connection()
printer = DarumaGeneric(conn)
printer.init()
printer.text('-' * 48)
printer.set_emphasized(True)
printer.text_center('SAT no. 000.000.000')
printer.set_emphasized(False)
printer.text_center('00/00/0000 00:00:00')
printer.lf()
printer.set_condensed(True)
printer.text('0000 0000 0000 0000 0000 0000 0000 0000 0000 0000 0000')
printer.set_condensed(False)
printer.lf()
printer.code128('0' * 22, labeled=False)
printer.lf()
printer.code128('0' * 22, labeled=False)
printer.lf(2)
printer.qrcode('The quick brown fox jumps over the lazy dog' * 5)
printer.lf(14)
@danielgoncalves

This comment has been minimized.

Copy link
Owner Author

@danielgoncalves danielgoncalves commented Mar 28, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment