A Chrome extension for printing barcodes with customizable printing profiles and settings.
- Popup Interface: Quick access to barcode printing with header, barcode input, and profile selection
- Customizable Printing Profiles: Configure paper size, label dimensions, margins, text formatting, and more
- Native Application Integration: Requires companion desktop application for printing functionality
- Developer API: Programmatic printing from any website
- Click on the pinned extension icon in the browser toolbar
- Enter the required data in the pop-up window:
- Header text (optional)
- Barcode content
- Select printing profile
- Press the "Print" button
- Use the "Settings" button to configure printing profiles
The extension provides comprehensive printing configuration:
- Paper Settings: Paper height, width, margins, offsets
- Label Layout: Label dimensions, labels per row/column
- Text Formatting: Font size, alignment, maximum length, rotation
- Barcode Options: DataMatrix support, barcode alignment and rotation
- Number Settings: Font size, alignment, and rotation for figures
- Printer Selection: Choose specific printer
- Open Chrome browser and navigate to: Extensions → Enable Developer Mode
- Click "Load unpacked extension", select the extension folder from the project, and click "OK"
- Copy the extension identifier
- Open
PrintaDot.slnfile in Visual Studio - Go to
Manifest.csfile and paste your extension identifier intoAllowedOriginsin the format:chrome-extension://Your_Identifier/ - Build the solution and run
PrintaDot.Windowsproject - Once the manifest is generated and you see "application ready to work" in console, you can close it
- Enable the extension and pin it to the browser toolbar
Helper class that communicates with the PrintaDot browser extension and the native host application.
Before printing, method sendPrintRequest ensure that both parts of the system are available:
-
Browser extension connection. If the extension is not installed or does not respond, an error is thrown.
-
Native host connection The method confirms that the native printing application is running and reachable.
/**
* Send print request to PrintaDot extension.
*
* @param {PrintItem[]} items - array of PrintItem objects
* @param {string} printType - print profile
* @returns {Promise<void>}
*/
async sendPrintRequest(items, printType = "default")Represents a single printable entity passed to the PrintaDot extension. Each item contains a mandatory barcode value and optional header/figures text.
/**
* @typedef PrintItem
* @property {string?} header - Optional header text
* @property {string} barcode - Barcode value (required)
* @property {string?} figures - Optional figures string
*/
class PrintItem {
constructor(header, barcode, figures = null) {
this.header = header;
this.barcode = barcode;
this.figures = figures;
}
}
