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

Bematech MP-4200TH incorrect hinting #31

Open
DiegoParadeda opened this issue Jun 22, 2023 · 0 comments · May be fixed by #32
Open

Bematech MP-4200TH incorrect hinting #31

DiegoParadeda opened this issue Jun 22, 2023 · 0 comments · May be fixed by #32

Comments

@DiegoParadeda
Copy link

DiegoParadeda commented Jun 22, 2023

Hello! I've had the following issues when using Bematech MP-4200TH:

image

  • Please notice how condensed and expanded text styles are not being applied in the left image
  • Also it's usage is erasing a few letters
  • The image on the right corresponds to the applied solution and will be mentioned in a PR very soon

Steps to reproduce:

Use the following code to print to a Bematech MP-4200TH
The result should look like the image above (the one with Issue written in it)

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

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 a pull request may close this issue.

1 participant