Skip to content

Instantly share code, notes, and snippets.

@buptxge
buptxge / print_with_win32print.py
Created April 7, 2016 08:38
Print image using win32print and PIL
import win32print
import win32ui
from PIL import Image, ImageWin
PHYSICALWIDTH = 110
PHYSICALHEIGHT = 111
printer_name = win32print.GetDefaultPrinter ()
file_name = "new.jpg"