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

Small image does not print. Strange characters appear. Epson TMU-220D #868

Closed
jreyessn opened this issue Jan 29, 2020 · 3 comments
Closed
Labels

Comments

@jreyessn
Copy link

jreyessn commented Jan 29, 2020

Hello Mike42!

You have done a great job with the library, I am grateful that it has been helpful in my project.

I have to print an invoice with a italic font type with bold type. So the printer takes the Generic Text font type and I can't customize the font, I resorted to printing a small image with the text I need.

I researched several Issues, mainly this #480 but none worked for me. I have used the methods and strange characters always appear when trying to print the image. I tried JPG, JPEG and PNG. Nothing works for me.

This is the small image I need to print:

2018-01-11-special-chars

Result (I tried the same code as in Issue #480):

2018-01-11-special-chars

Thanks for your help. Sorry my english.
Greetings to you.

@mike42 mike42 added the example label Feb 6, 2020
@mike42
Copy link
Owner

mike42 commented Feb 6, 2020

The good news is that the TM-U220D does support the commands being used to print like this, though there is clearly something going wrong.

I think the key is density: The example at #480 was written for a TM-T20II, which has 24 vertical pixels per line. You need 8 pixels per line I think.

The first thing I would do is re-draw your image, 8 pixels high, pure black and white.

You can then try something like this first (based on the #480 code):

$printer -> inlineImage($char, Printer::IMG_DOUBLE_HEIGHT | Printer::IMG_DOUBLE_WIDTH);

I have a TM-U220B, but I'm a bit too short of time at the moment to test whether this works. If this doesn't solve it, then leave this issue open, and I'll come back and write an example at some point in the future. I need to write an example which uses a custom currency symbol on this printer anyway.

@jreyessn
Copy link
Author

jreyessn commented Feb 6, 2020

Yes! it was the amount of vertical pixels. I used 8 pixels high.

Thank you Mike42. It wouldn't have occurred to me to think about it. I know very little about printers.

@jreyessn jreyessn closed this as completed Feb 6, 2020
@adverich
Copy link

adverich commented Jul 3, 2020

Yes! it was the amount of vertical pixels. I used 8 pixels high.

Thank you Mike42. It wouldn't have occurred to me to think about it. I know very little about printers.

Hola @juanisn , Podrias por favor copiar el codigo que utilizaste para usar esa imagen?
Necesito usar exactamente la misma imagen pero no logro hacerlo funcionar, si utilizo una imagen pequeña directamente se traba la impresora y con una de mayor tamaño, se corta.

Gracias!!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants