Print direct to printer with Acrobat Reader
Posted: Thu May 03, 2018 11:57 am
Hi,
I have in program direct print with Adobe Acrobat reader like this :
RunShell("/N /T "+cestatlac+ntsppdf,cestapdfview,.t.,.t.)
because after print stay open acrobat on bottom taskbar I realize kill it after print , using test if Acrord32 is in tasklist. Acrobad killed only when in tasklist not exist row with name of printed file.
This works fine to this moment, when I connect my new network printer.
Document "go" to printer, but immediately acrobat kill and print stopped.
This looks than document send to printer via LAN, Acrobat windows closed, blank acrobat on bottom taskbar stay and I do not know, when can kill acrobat process.
So, I want ask, who know how test if document was printed.
I found one solution, but no very elegant, used WMIC.EXE PRINTJOB GET >filequeue.csv
called via Runshell
after generate file filequeue.csv I search, if there is name of my printed file, when no, can kill acrobat, when yes, wait and after some time generate queuelist again.
But this is not very elegant system, because using runshell and generate files on disk etc.
Exist some DLL called function to list queues, or this (calling DLL) can be same as call exe ?
I do not want any other utilities, application because this need install on PC every users. This must be
universal and using internal OS functions.
I have in program direct print with Adobe Acrobat reader like this :
RunShell("/N /T "+cestatlac+ntsppdf,cestapdfview,.t.,.t.)
because after print stay open acrobat on bottom taskbar I realize kill it after print , using test if Acrord32 is in tasklist. Acrobad killed only when in tasklist not exist row with name of printed file.
This works fine to this moment, when I connect my new network printer.
Document "go" to printer, but immediately acrobat kill and print stopped.
This looks than document send to printer via LAN, Acrobat windows closed, blank acrobat on bottom taskbar stay and I do not know, when can kill acrobat process.
So, I want ask, who know how test if document was printed.
I found one solution, but no very elegant, used WMIC.EXE PRINTJOB GET >filequeue.csv
called via Runshell
after generate file filequeue.csv I search, if there is name of my printed file, when no, can kill acrobat, when yes, wait and after some time generate queuelist again.
But this is not very elegant system, because using runshell and generate files on disk etc.
Exist some DLL called function to list queues, or this (calling DLL) can be same as call exe ?
I do not want any other utilities, application because this need install on PC every users. This must be
universal and using internal OS functions.