Comments (2)
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:
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.
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)
- Error with some png image HOT 4
- Weird binary file, library wasn't able to give any output HOT 1
- Printing images HOT 2
- Add support for upside-down, black-white invert printing modes HOT 1
- Print Margin on Top HOT 2
- Support for QR codes HOT 5
- How to gerate Invoice like this? Or how to add html in print view? HOT 2
- esc2html encoding HOT 3
- I get a blank page when I execute my file ascii.bin with php esc2html.php ascii.bin > output.html HOT 2
- Add support for user-defined character sets HOT 1
- fopen(/tmp/test.bin): failed to open stream: No such file or directory HOT 1
- esc2html: Uncaught ImagickException: insufficient image data in file
- Composer support HOT 1
- Add Docker support HOT 1
- Unable to generate Barcode HOT 1
- Unable to generate with Esc2html HOT 3
- Composer issue : Failed to extract mike42/escpos-php HOT 1
- For those who need encoding, use it. HOT 1
- How to implement in laravel? HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from escpos-tools.