Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RMV] Bematech 4200TH hinting functions and unused functions #32

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

DiegoParadeda
Copy link

Solves https://github.com/base4sistemas/pyescpos/issues/31

image

Test code:

from pyescpos.conn.win32 import Win32Raw as Connection
from pyescpos import barcode
from pyescpos.impl.bematech import MP4200TH

conn = Connection.create('MP-4200 TH') # printer name (on windows 10)
impressora = MP4200TH(conn)
impressora.init()


impressora.text("Hello World! 1\nLine")
impressora.lf()

impressora.set_condensed(1)
impressora.text("Hello World! condensed\nLine")
impressora.set_condensed(0)
impressora.lf()

impressora.set_expanded(1)
impressora.text("Hello World! expanded\nLine")
impressora.set_expanded(0)
impressora.lf()

impressora.code128(
        '0123456789',
        barcode_height=96,
        barcode_width=barcode.BARCODE_DOUBLE_WIDTH,
        barcode_hri=barcode.BARCODE_HRI_BOTTOM
    )
impressora.lf()

impressora.ean13(
        '4007817525074',
        barcode_height=120,
        barcode_width=barcode.BARCODE_NORMAL_WIDTH,
        barcode_hri=barcode.BARCODE_HRI_TOP
    )
impressora.cut()

Printer used:
WhatsApp Image 2023-06-22 at 10 34 38 AM

@DiegoParadeda DiegoParadeda linked an issue Jun 22, 2023 that may be closed by this pull request
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Bematech MP-4200TH incorrect hinting
1 participant