Closed Ashish3080 closed 2 weeks ago
win32ui is not expected to have CreatePrinterDC
. I don't know enough about printing to help, but the instructions you deleted re following the instructions at https://github.com/mhammond/pywin32#support would have found people who might.
I am trying to print a pdf file to a specific printer using win32print. I am using this code: import win32print import win32ui import win32com.client import os
def print_pdf_to_printer(printer_name, pdf_path):
if name == "main":
I have not been able to get any further as I get this error "Exception occurred: module 'win32ui' has no attribute 'CreatePrinterDC'. and I have to select the default printer and using 'ctrl' + 'p' as hoteky to print the file. Please if anyone can anyone provide the solution to the issue or if can anyone tell how can i use python to print files on a specific printer without the need of downloading an .exe file.