How to get the output directory and the file name from the printer driver?

Home » Printer Drivers » How to get the output directory and the file name from the printer driver?
Printer Drivers No Comments

There are several ways of getting the output directory of the printer driver:

1. If you want to retrieve the output directory configured for the current user before printing, you can use the
GetOutputDirectory API function from BlackIceDEMOVDE.dll or BlackIceDEVMODE.ocx
For example:
BlackIceDEVMODE* pDevMode = LoadBlackIceDEVMODE(“Black Ice PDF Server”);
TCHAR* pOutputDirectory = GetOutputDirectory(pDevMode);

ReleaseBlackIceDEVMODE(pDevMode);

Please see the following pages for more information:
http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/How_to_use_the_BlackIceDEVMODE_dll.htm
http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/How_to_use_the_BlackIceDEVMODE_OCX.htm

2. To get the output filename of the currently printing document during printing, including the output directory, the Printer Driver Messaging Interface, or Plugin DLL can be used.
Please see any of the Message Capture or BiPlugin Samples that are included in the RTK, or check the following pages in the manual:
http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/API_for_Messaging_Interface.htm
http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/API_for_Plug-in.htm

3. To get the exact filename of the last output file the Printer Driver printed, including the output directory, you can read the C:\Windows\Temp\bi_group.ini file.
For more information, please see: http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/Bi_group_ini.htm

It is also possible to set the Printer Driver to start an application and pass the output filename of the printed document as parameter, after the print job is finished.
Please see:
http://www.blackice.com/Help/Tools/PrinterDriver%20Demo/RTK_Full_WebHelp/Starting_an_Application.htm

Regards,
Developer Support Team