align left and right on the same line
See original GitHub issueWhat steps will reproduce the problem?
1. use Epson TM-T20
2. execute the following code
3.
What is the expected output? What do you see instead?
I would like to format a line to begin on the left with some words ("article"
in my example) and then align on the right to write the price (15.00 € here)
What version of the product are you using? On what operating system?
python-escpos 1.0-1 on ubuntu 13.10
Please provide any additional information below.
code :
Epson.set("LEFT", "A", "", 1, 1)
Epson.text("Article 1")
Epson.set("RIGHT", "A", "", 1, 1)
Epson.text("15.00 \xd5")
Epson.text("\n")
Original issue reported on code.google.com by shu...@gmail.com
on 15 May 2014 at 10:29
Issue Analytics
- State:
- Created 9 years ago
- Comments:14 (11 by maintainers)
Top Results From Across the Web
How to apply left and right alignment to text in Word
Click to the left of the text you want to right align. For this example, click to the left of “right-aligned,” and press...
Read more >Flush Left and Flush Right On the Same Line (Microsoft Word)
In the Alignment area, click Right. (This tells Word that this will be a right-aligned tab, just like you want.) Click on Set....
Read more >Left Align and Right Align Text on the Same Line - CSS-Tricks
It can sometimes be useful to have some text be aligned to the left and some text be aligned to the right on...
Read more >How to align text left and right on the same line in Microsoft Word
How to align text left and right on the same line in Microsoft Word · Go to the 'Indents and Spacing' section. ·...
Read more >How may I align text to the left and text to the right in the same ...
<p style="text-align:left;"> This text is left aligned <span style="float:right;"> This text is right aligned </span> </p>. Run code snippet
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I had to use this feature for receipt-like printing recently. Here is the snippet that I used (with hardcoded width from my printer):
Maybe we can think of a kind of API for this. At least it will help if someone wants to do this right now without using a cleaner solution (I think this is Python 3 only).
I don’t think that escpos printers are capable of this. Probably the best way to do that is by using tabs.