Printer Port configuration using redmon and ghostscript, error invalid window handle

747 Views Asked by At

I want to print to pdf using Redmon and Ghostscript on windows 10, for which i added a new printer(set drivers to ghostpdf.inf) and added redirection port(RPT1). Now when i configure this port i get the error Invalid window handle, please check the picture. Thanksenter image description here

3

There are 3 best solutions below

0
On

Ok, late to the party, but I tried using Win11. And for me, as @Jay mentioned, run cmd as administrator and then

rundll32 printui.dll,PrintUIEntry /n /p "Ghostscript PDF PRINTER"

helped. Than my program was called when Printing to "Ghostscript PDF PRINTER" with redmon 1.9. Very nice.

0
On

Okay you need admin rights - edit port configuration using cmd as admin with command - printui.dll PrintUIEntry /p /n "printer name"

1
On

It is much better and more stable if you create a new port via "Print Management" of Windows, not via Printer Properties window