Coder Social home page Coder Social logo

Comments (26)

ul-rotha avatar ul-rotha commented on May 19, 2024 1

thank you brother it works.

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024 1

how to solve this problem bro?
Here is my package that i customize from: https://pub.dev/packages/flutter_esc_printer. Hope it will help you to solve your problems bro.

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024 1

how to solve this problem bro?
Here is my package that i customize from: https://pub.dev/packages/flutter_esc_printer. Hope it will help you to solve your problems bro.

Thank you so much for you help bro

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

Is there any idea or solution that I can do, please let me know. Thank you in advance.

from esc_pos_printer.

andrey-ushakov avatar andrey-ushakov commented on May 19, 2024

Hi,

I think the easiest way would be just to resize the image before printing.

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

Thank you for your response, I did resize to fit the page by just 272 pixel, but it seems like all printing image just take only half of the paper width. I also did resize to make it to be bigger, but got the same result.

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

But when I change highDensityHorizontal to true and highDensityVertical to true in printImage() method, I get full width printing, but another issue has happened, which is the texts printed are not clear, it was a bit bold and dark.

from esc_pos_printer.

andrey-ushakov avatar andrey-ushakov commented on May 19, 2024

So any image takes exactly a half of the width? I would say it should depend on image width/height ratio but unfortunately I can't test it as I don't have a POS printer right now... There are chances that it also depends on a printer's brand.

For the unclear printing with highDensity = true, did you try to print a high-resolution image? Does it resolve the issue?

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

Yes, I did test it by using the same image I printed with browser. but the quality of image I printed using browser is better quality than. It is cleared text.

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

Here the result of what I tested with image captured with width of 270px. https://ibb.co/NF6yCZf

It took only haft of the paper page to print.

from esc_pos_printer.

HTipi avatar HTipi commented on May 19, 2024

Hi bro@kechankrisna

Could you help share the printer model details?
Thank in advance

from esc_pos_printer.

andrey-ushakov avatar andrey-ushakov commented on May 19, 2024

Hi @kechankrisna

I finally have time and a pos printer to test the issue you have described.
If you can share your image and the exact code, I can test it on my device and fix the problem.
As far I can see from your image, you are using a 160mm paper and this lib was developed for a 80mm printer. Probably the easiest way (but definitely not the best) is to add a parameter in future releases to define the paper size.

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

I am sorry for being late to reply on this problem, I found the solution now, by change picture width to 570px while I also changed highDensityHorizontal to true and highDensityVertical to true for printImage() function. My printer model is X-Printer xp-n160ii printer.

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

do you have sample code print our khmer unicode to thermal printer?

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

do you have sample code print our khmer unicode to thermal printer?

try to print as image bro

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

how to write receipt as image bro?

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

you can use any plugin to capture widget to image. This package can be found in pub or I created one too.
https://pub.dev/packages/flutter_screenshot

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

image so small after capture screen and pass to ticket.image(image);

124811781_410621290318329_8194284614197584876_n

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

change picture width to 570px so that would be enough

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

could you link url code for changing picture width? i could not found

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

Here is a sample:
final Ticket ticket = Ticket(PaperSize.mm58); final Image image = decodeImage(file.readAsBytesSync()); final Image thumbnail = copyResize(image, width: 572); ticket.image(thumbnail);

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

do you have problem like me when we have long receipt , printer can not print successful and not cutting paper?

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

do you have problem like me when we have long receipt , printer can not print successful and not cutting paper?

Sure, that is the reason i clone this repo and update a new one which delay and chunk.

from esc_pos_printer.

ul-rotha avatar ul-rotha commented on May 19, 2024

how to solve this problem bro?

from esc_pos_printer.

kechankrisna avatar kechankrisna commented on May 19, 2024

how to solve this problem bro?
Here is my package that i customize from: https://pub.dev/packages/flutter_esc_printer. Hope it will help you to solve your problems bro.

Thank you so much for you help bro

you are welcome :D

from esc_pos_printer.

YouSour avatar YouSour commented on May 19, 2024

hi , how can you guy solve this problem ? this package look like outdated https://pub.dev/packages/flutter_esc_printer which package you're using right now ?

from esc_pos_printer.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.