Description:
Black Ice Software no longer supports Delphi programming language. The Samples are provided without technical support.
The Black Ice printer drivers include a feature which allows the driver to refuse any print jobs other than those coming from the developer’s printing application. The restriction is made using a password. The printer driver will print jobs only from the application that “knows” the password. The password can be any string defined by the developer in the printer driver INI file.
The Black Ice printer driver will scan the document name passed by the printing application for the presence of the password, i.e. the $MyPassword$ string. If the password string is present in the document name, the files are generated, if the document name does not contain the password, the print job will be aborted.
This option is not a security feature, it is designed to make sure that your application is the only one which can print to the Black Ice printer driver, and other applications cannot (such as Word, Excel, etc.) If you need an authentication or other security related feature, use the BiPlugIn feature of the printer driver.
Trying the Sample:
To try the sample, you need to edit the printer driver’s INI file. Add a new line to the “[Default Settings]” section of the INI file: “Password=$MyAppPassword$” without parentheses. Open the Printing Preferences and click Restore Defaults to reload the INI file. The sample tries to print a test document using the $MyAppPassword$ password, therefore if you set this password in the INI file or you don’t set a password, the printing will work, otherwise it will not. (Depending on the output file format, the driver might create a file, but it will be unreadable.)
Sample Source Code Folder Location:
32 bit:
<RTK Installation Folder>\<RTK 32/64 bit>\Samples\Sample Source Codes\Delphi\Restrict Printing Delphi Sample
Language: |
Project file: |
Compiler: |
Delphi |
RestrictPrintingDelphi.dpr |
Delphi 5 |
Delphi |
RestrictPrintingDelphi.dproj |
Delphi XE2 |
|
|
|
Files needed for redistribution:
Restrict Printing Delphi Sample
- Restrict Printing Delphi Sample.exe
- INI file (Optionally change the printer name in the INI file):
- SampleSettings.ini
Warning: You must copy the appropriate dll files to the project folder.
Note: Please make sure that you use the appropriate Resource ToolKit, there are two different RTKs.
- API/RTK for 32/64 bit Windows 11, 10, 8.1, 7
- API/RTK for 32/64 bit Windows Server 2025/2022/2019/2016/2012