Examples: add block_text usage demo
This commit is contained in:
parent
f63b0a77ce
commit
f51af2765b
|
@ -0,0 +1,22 @@
|
|||
#!/usr/bin/env python3
|
||||
|
||||
from escpos import printer
|
||||
|
||||
txt = """Lorem ipsum dolor sit amet, consectetur adipiscing elit. Nulla pellentesque augue libero. Integer non erat in velit venenatis tristique. Phasellus id ultrices orci. Quisque est ligula, varius vel justo sit amet, laoreet porttitor orci. Nulla commodo porta augue id molestie. Duis tempor eget tellus vel posuere."""
|
||||
|
||||
p = printer.Usb(0x04B8, 0x0E20)
|
||||
|
||||
|
||||
for i in [20, 30, 40, 60]:
|
||||
p.set_with_default(custom_size=True, width=3, height=3, underline=True)
|
||||
p.textln("Blk-txt(%d col)" % i)
|
||||
|
||||
p.set_with_default()
|
||||
p.block_text(txt, columns=i)
|
||||
p.ln(2)
|
||||
|
||||
|
||||
p.ln(4)
|
||||
|
||||
|
||||
p.cut(mode="PART", feed=True)
|
Binary file not shown.
After Width: | Height: | Size: 124 KiB |
Loading…
Reference in New Issue