Open niktses opened 4 years ago
ok even though i did figure it out
change cRasterImg and in my case this: header.addAll(_intLowHigh(widthBytes * heightPx + 11, 2)); header.addAll(_intLowHigh(48, 1)); header.addAll(_intLowHigh(112, 1)); header.addAll(_intLowHigh(48, 1)); header.addAll(_intLowHigh(1, 1)); header.addAll(_intLowHigh(1, 1)); header.addAll(_intLowHigh(49, 1)); header.addAll(_intLowHigh(widthPx, 2)); header.addAll(_intLowHigh(heightPx, 2));
that was not my problem after all because my printer supports the GS x 0 format. Added real problem here: https://github.com/andrey-ushakov/esc_pos_utils/issues/7
First of all, thank you for all your contributions!
Could you please provide your code and the image file to test it on my printer?
Have you tried to print using ESC *
command (Ticket.image
method)?
What's the "GS x 0 format"?
I meant GS v 0. The image doesn't matter as long as it is not too big mine was 576 x 100 (png). The important thing is that the printer has to support "GS ( L". Then again some properties might be printer related. I got them from here. https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=99#gs_lparen_cl_fn112
Hi @niktses ,
If your printer supports GS ( L
command, could you please test the new printing method:
ticket.imageRaster(image, imageFn: PosImageFn.graphics);
Does the command ESC *
work for you (Ticket.image
method)?
I've tested the GS ( L
command on 3 printers and none of them support it. However, the bytecode should be correct, Python esc/pos library generated the same bytecode.
made this changes and it works:
} else if (imageFn == PosImageFn.graphics) {
// 'GS ( L' - FN_112 (Image data)
final List
Unfortunately, it still doesn't work in my case..
if your printer doesn't support it you won't be able to test it.
one last change if it is possible: i changed
const gs2 = '\x38'; const cRasterImg = '$gs${gs2}L'; header1.addAll(_intLowHigh(widthBytes * heightPx + 11, 4)); // pL pH <------------ 4
it allows for images with more height
I test ticket.image by using reciept.jpg and resize it to 572 on device T1, but it prints only half of image.
I test ticket.image by using reciept.jpg and resize it to 572 on device T1, but it prints only half of image.
Did you found any solution to it?
I test ticket.image by using reciept.jpg and resize it to 572 on device T1, but it prints only half of image.
Did you found any solution to it?
Try the package pos printer manager might help you
Try the package pos printer manager might help you
Thank you, it solved my issue. using pos_printer_manager
Do you think replacing it with GS ( L is possible? I tried to understand how the command should become but i find it too complex. read these : https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=98#gs_lparen_cl_fn50 https://reference.epson-biz.com/modules/ref_escpos/index.php?content_id=99#gs_lparen_cl_fn112 https://stackoverflow.com/questions/13715950/writing-a-bitmap-to-epson-tm88iv-through-esc-p-commands-write-to-nvram
The images print really slowly because they are being divided in many parts and printed individually right now. This should print it in one piece.