Skip to content
Discussion options

You must be logged in to vote

Try this code:

import peripage

printer = peripage.Printer(
    # MAC
    mac='00:15:83:15:BC:5F',
    # Doesn't matter:
    printer_type=peripage.PrinterType.A6p
)
printer.connect()

# Print many letters in hex to determine the width
printer.writeASCII('0123456789ABCDEF' * 20)

printer.disconnect()

This shoud print 0123456789ABCDEF repeated 20 times. Count length of line in 16base, convert to 10base and you will get the width of line in characters.

Next, add your printer spec here:
https://github.com/bitrate16/peripage-python/blob/main/peripage/__init__.py#L46
similar to others, or tell me and i'll add:

row_characters=SOME_VALUE_YOU_GOT
row_width=row_characters * 12
row_bytes=row_width // 8

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by anthony-foulfoin
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants