Giter VIP home page Giter VIP logo

Comments (2)

mike42 avatar mike42 commented on May 24, 2024

Can you tell me a bit more about how this file was captured, and what type of printer it is for?

Since our expected output is basically "whatever a real printer would do", I sent your file to a real Epson TM-T20II (USB) to see what it looks like:

cat 2019-10-ascii.txt > /dev/usb/lp0

And this was the output:

2019-12-example

This approximately corresponds with what esc2text does (the difference in the garbled text appears to be due to the fact that your input uses ESC t, which has no effect in these tools yet, see #61)

$ php esc2text.php examples/2019-10-ascii.txt 
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE �
WARNING: Unknown command DLE �
WARNING: Unknown command DLE �
WARNING: Unknown command DLE �
WARNING: Unknown command DLE !
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE A
WARNING: Unknown command DLE @
WARNING: Unknown command DLE !
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE A
WARNING: Unknown command DLE @
WARNING: Unknown command DLE !
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE !
WARNING: Unknown command DLE D
WARNING: Unknown command DLE @
WARNING: Unknown command DLE !
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE !
WARNING: Unknown command DLE D
WARNING: Unknown command DLE @
WARNING: Unknown command DLE 
WARNING: Unknown command DLE NUL
WARNING: Unknown command DLE �
WARNING: Unknown command DLE �


@┬Ç├╝@?├╛C┬Å├Ç├░?├╝?├ú├░bD@üüDA┬êÇä2├ÇD ├üD DD┬ÇD DB DDD AB@$DD┬îl├â├Ç7├░├á D@$Dpp├╝┬É┬Ç┬Ç ┬ÇD @ ┬ÇD @ ┬Ç┬Ç┬Ç┬Ç

Your input file is not understood by a real ESC/POS printer, so I think that the output is as good as can be expected.

I did find some problems with how we handle errors in esc2html - it crashes due to a malformed image command instead of presenting the same text in a HTML page. That's certainly a bug, but I've raised a separate issue for it (#66), because it's sort of incidental to your problems here.

from escpos-tools.

mike42 avatar mike42 commented on May 24, 2024

I'm also assuming that this is a follow-up to #62, so I've closed that off.

I don't know how you're capturing your files, but if a real printer can't understand them, then these tools won't do any better.

from escpos-tools.

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.