diff --git a/printer.py b/printer.py new file mode 100644 index 0000000..1e18ddf --- /dev/null +++ b/printer.py @@ -0,0 +1,17 @@ +import StarTSPImage +from PIL import Image, ImageDraw, ImageFont, ImageOps +import textwrap +import random + +def printer(): + im = Image.new("RGB", (800, 1280), (0, 0, 0)) + + # im.show() + + raster = StarTSPImage.imageToRaster(im, cut=True) + + printer = open('/dev/usb/lp0', "wb") + printer.write(raster) + +if __name__ == "__main__": + printer() \ No newline at end of file