TLClientPrint - Creating a Custom Print Dialog
Product ThermalLabel SDK for .NET Published 02/25/2021 Updated 05/25/2023 Author Neodynamic
Overview
ThermalLabel SDK for .NET ships with the TLClientPrint utility app that allows printing barcode labels from ASP.NET websites to the available printers at the client-side
In this walkthrough, you'll learn how to create a Custom Print Dialog add-in for the TLClientPrint App that will look like the following image.
Follow up these steps
Download Add-in Source Code
The source code for the Custom Print Dialog Add-in is available at GitHub. Code is in C# but easily converted to VB. Download and analyze it. Make any changes you might need or want and then compile/build it. It will generate theTLClientPrint.Plugin.CustomPrintDialog.dll
file.Create a new Custom TLClientPrint Installer
- Once
TLClientPrint.Plugin.CustomPrintDialog.dll
file was generated, then you must package it with the rest of TLClientPrint required files. - Download TLClientPrint installer and install it in your dev machine.
- Then go to the installed dir which by default is under
C:\Program Files (x86)\Neodynamic\TLClientPrint\{version}\
- All the required files are under that folder. You can ignore the
unins*.*
files which are part of the our uninstaller. - The only file that must be replaced by your custom print dialog is the default Print Dialog which is provided in the
TLClientPrint.Plugin.DefaultPrintDialog.dll
file.
- All what you must do now is to package them into a Windows Installer . You can use any software for creating the installer, however, we recommend Inno Setup.
IMPORTANT: Your installer project must also register the Custom URL Protocol namedtlprint
. To register the protocol in the Windows Registry use these entries (Be sure you CHANGE the {YOUR OWN FOLDER} shown below):
[HKEY_CLASSES_ROOT\tlprint] @="ULR:ThermalLabel Client Print Protocol" "URL Protocol"="" [HKEY_CLASSES_ROOT\tlprint\Shell] [HKEY_CLASSES_ROOT\tlprint\Shell\Open] [HKEY_CLASSES_ROOT\tlprint\Shell\Open\Command] @="\"C:\\Program Files (x86)\\{YOUR OWN FOLDER}\\TLClientPrint.exe\" \"%1\""
- Also note that TLClientPrint.exe requires .NET Framework 4.6.1+ being available at the client machine.
- That's it. Create your new installer and test it.
- Once