git.schokokeks.org
Repositories
Help
Report an Issue
python-escpos-printer.git
Code
Commits
Branches
Tags
Suche
Strukturansicht:
ff31c22
Branches
Tags
main
v0.1.0
python-escpos-printer.git
src
escpos_printer
esccapture.py
initial commit
Bernd Wurst
commited
ff31c22
at 2026-11-26 17:47:00
esccapture.py
Blame
History
Raw
# -* coding: utf-8 *- # (C) 2012 by Bernd Wurst <bernd@schokokeks.org> # This file is part of Bib2011. # # Bib2011 is free software: you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by # the Free Software Foundation, either version 3 of the License, or # (at your option) any later version. # # Bib2011 is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the # GNU General Public License for more details. # # You should have received a copy of the GNU General Public License # along with Bib2011. If not, see <http://www.gnu.org/licenses/>. from .esc import ESCPrinter # Barcode chars BARCODE_TXT_BLW = '\x1d\x48\x02' # HRI barcode chars below BARCODE_FONT_A = '\x1d\x66\x00' # Font type A for HRI barcode chars BARCODE_HEIGHT = '\x1d\x68\x64' # Barcode Height [1-255] BARCODE_WIDTH = '\x1d\x77\x03' # Barcode Width [2-6] BARCODE_EAN13 = '\x1d\x6b\x02' # Barcode type EAN13 class ESCCapture(ESCPrinter): def __init__(self, fileobject): self.codepage_id = 19 self.fileobject = fileobject def __del__(self): pass def raw(self, data): self.fileobject.write(data) def drawerIsOpen(self): return False