print-spooler-api

How to pause the Win32_printJob by Printername and JobID

白昼怎懂夜的黑 提交于 2019-11-29 12:27:29
TASK When user print the document ,pause the pop will appear then fill the form click enter the form will closed and job has been resumed. We have 50 Network Printers , 2000 Client Machine and one print server . EACH CLIENT had 3 or 4 printers PROBLEM If user print the document locally (EX:PDF PRINTER, XPS DOCUMENT WRITER) (or) using network printer (CANON,HP) the print-job was immediately PAUSE. MY TRIES When print any of the document the event listener watching and return the print job . In First Pause Method sometimes work and mostof time doesn't work properly.Because, Its searching for the

How to pause the Win32_printJob by Printername and JobID

北城以北 提交于 2019-11-28 06:13:32
问题 TASK When user print the document ,pause the pop will appear then fill the form click enter the form will closed and job has been resumed. We have 50 Network Printers , 2000 Client Machine and one print server . EACH CLIENT had 3 or 4 printers PROBLEM If user print the document locally (EX:PDF PRINTER, XPS DOCUMENT WRITER) (or) using network printer (CANON,HP) the print-job was immediately PAUSE. MY TRIES When print any of the document the event listener watching and return the print job . In

How to programmatically achieve editing of the spool file header of the normal windows print queue 'spool file' before it is sent to the printer?

£可爱£侵袭症+ 提交于 2019-11-28 06:05:50
问题 How to intercept and change the windows 7 print spool file (.SPL) to add some additional information in the header like '@PJL SET NAME="PainPoint" ' before this file is sent to the printer during the execution of the print job? The .SPL file partial extract from top is : %-12345X@PJL SET STRINGCODESET=UTF8 @PJL COMMENT DATE=02/08/2017 @PJL ENTER LANGUAGE=PCLXL ) HP-PCL XL;2;1;FXXPL2-1.0.0,WINNT-6.1,XPL2DRV-6.9.1.1 ?X???........ 回答1: Editing the spool file is obviously trivial. The trick is