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???........
Editing the spool file is obviously trivial. The trick is how to get access to the spool file.
I can think of a few ways offhand:
If you don't need to do this transparently you could set up RedMon (free) to call your app to edit the spool file. RedMon will then send it to the desired printer.
VeryPDF has some similar commercial products with more capabilities.