Python print pdf file with win32print
问题 I'm trying to print a pdf file from Python with module win32print but the only way I can print success is a text. hPrinter = win32print.OpenPrinter("\\\\Server\Printer") filename = "test.pdf" try: hJob = win32print.StartDocPrinter(hPrinter, 1, ('PrintJobName', None, 'RAW')) try: win32api.ShellExecute(0, "print", filename, None, ".", 0) win32print.StartPagePrinter(hPrinter) win32print.WritePrinter(hPrinter, "test") # Instead of raw text is there a way to print PDF File ? win32print