Python print pdf file with win32print

后端 未结 3 786
礼貌的吻别
礼貌的吻别 2021-01-11 23:28

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.OpenPri         


        
3条回答
  •  旧巷少年郎
    2021-01-11 23:53

    You can try

    win32print.SetDefaultPrinter("\\\\Server\Printer")
    

    This method accepts a String, not the printer object you tried to pass it.

提交回复
热议问题