Python Programmieren Lernen Pdf Printer
I have a PDF document and I want to print it with my python app. I have tried the solution in but when I install Ghostscript 9.15 that is the actual version, it has no gsprint.exe The way I am using that works is with the command os.startfile('PDFfile.pdf', 'print') but it opens default viewer (mine is Adobe Reader) and after printing it stills open, trying to kill the process with os.system('TASKKILL /F /IM AcroRD32.exe') kills other opened windows and I dont want it. With the next command, it also prints, but it let the Adobe Reader opened too currentprinter = win32print.GetDefaultPrinter() win32api.ShellExecute(0, 'print', 'PDFfile.pdf', '/d:'%s'% currentprinter, '.' , 0) I have seen too but they recommend using gsprint.exe again Anybody has the gsprint.exe file or any other solution? NOTE: When I used another default program to open PDF files like Chrome or Windows Reader, I always get an Exception in the execution of the commands above '(31, 'ShellExecute', 'A device attached to the system is not functioning.'