Virtual Printer

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
MonuKashyap
Posts: 112
Joined: 06 Jun 2016, 21:32

Virtual Printer

Post by MonuKashyap » 09 Dec 2021, 06:44

is it possible to create a virtual Printer to save as pdf
i know its possible with "Microsoft Print to Pdf" printer (and other pdf creators too)

but, my problem is that , after clicking print button , there is another window asking me to name the file to save,, and the time is 3-5 seconds and more in some systems,,

so i wanted to that if i print with my virtual printer, it saves as pdf with name %MyVar% to %PresetLocation%
this makes whole process more faster than existing.

welcome to discuss, suggest, information, help, in this topic.

User avatar
mikeyww
Posts: 27095
Joined: 09 Sep 2014, 18:38

Re: Virtual Printer

Post by mikeyww » 09 Dec 2021, 06:53


MonuKashyap
Posts: 112
Joined: 06 Jun 2016, 21:32

Re: Virtual Printer

Post by MonuKashyap » 09 Dec 2021, 07:50

that converts a local file in the computer
and what about online, if a print popup is automatically coming by a website.
is there any option ,,

User avatar
mikeyww
Posts: 27095
Joined: 09 Sep 2014, 18:38

Re: Virtual Printer

Post by mikeyww » 09 Dec 2021, 08:01

Code: Select all

MyVar           = test.pdf
PresetLocation := A_ScriptDir
winTitle        = ahk_class Chrome_WidgetWin_1
#If WinActive(winTitle)
#^p:: ; WIN-CTRL-P = Print to PDF (or whatever default printer)
SoundBeep, 1700
Send ^p
Sleep, 800
Send `n
WinWaitActive, ahk_class #32770,, 3
If ErrorLevel
 MsgBox, 48, Error, An error occurred while waiting for the window. Aborting.
Else ControlSetText, Edit1, %PresetLocation%\%MyVar%
Return
#If

MonuKashyap
Posts: 112
Joined: 06 Jun 2016, 21:32

Re: Virtual Printer

Post by MonuKashyap » 11 Dec 2021, 13:34

Dear mikey,,
thats a very good suggestion
but

i am already using this method,
the main problem is the loading time which is 3-5 or more seconds in some of my older systems,,

i want to fix the loading time,,
which is possible by pre loading or creating a virtual printer (i think)

User avatar
mikeyww
Posts: 27095
Joined: 09 Sep 2014, 18:38

Re: Virtual Printer

Post by mikeyww » 11 Dec 2021, 13:49

I don't know how you would change the conversion time to print an online document. Others here may know.

MonuKashyap
Posts: 112
Joined: 06 Jun 2016, 21:32

Re: Virtual Printer

Post by MonuKashyap » 11 Dec 2021, 20:39

okay, No issue,,
thanks..

Post Reply

Return to “Ask for Help (v1)”