pda_608_plugin 0.0.8 copy "pda_608_plugin: ^0.0.8" to clipboard
pda_608_plugin: ^0.0.8 copied to clipboard

unlisted

A plugin for PDA-608 barcode scanner and thermal printer integration

PDA 608 Printing and Scanning Plugin #

A Flutter plugin for integrating with 608 PDA devices, providing printing and scanning functionality.

Features #

  • Thermal printing (text, barcodes, QR codes, and images)
  • Barcode scanning
  • Support for different paper types and sizes (standard thermal paper and gap label paper)
  • Support for different paper widths (52mm and 80mm)

Getting Started #

Installation #

Add this to your package's pubspec.yaml file:

dependencies:
  pda_608_plugin: ^0.0.8
Android Setup
Important Note: Before integrating this plugin, ensure you uninstall any test apps installed on the device to avoid serial port conflicts. Failure to do so may result in garbled printing, delays, or even failures.
Usage
Initialize the Plugin
dartCopyimport 'package:pda_608_plugin/pda_608_plugin.dart';

// Initialize the plugin
await PDA608Plugin.initialize();
Printing Text
dartCopy// Print text
// Parameters: paperWidth (52 or 80), fontSize, alignment (0: left, 1: center, 2: right), 
// text content, isLabel (true for gap paper), tearPaper
await PDA608Plugin.printText(52, 1, 1, "Hello World!", true, true);
Printing Barcode
dartCopy// Print barcode
// Parameters: paperWidth, alignment, width, height, data, showText, fontSize, isLabel, tearPaper
await PDA608Plugin.printBarcode(52, 1, 380, 100, "123456789", true, 16, true, true);
Printing QR Code
dartCopy// Print QR code
// Parameters: paperWidth, alignment, width, height, data, showText, fontSize, isLabel, tearPaper
await PDA608Plugin.printQRCode(52, 1, 200, 200, "https://example.com", true, 16, true, true);
Printing Image
dartCopy// Print image
// Parameters: paperWidth, alignment, imageBytes, isLabel, tearPaper
await PDA608Plugin.printImage(52, 1, imageBytes, true, true);
Scan Barcode
dartCopy// Scan barcode
await PDA608Plugin.startScan();

// Listen for scan results
PDA608Plugin.scanStream.listen((scanResult) {
  print("Scanned code: $scanResult");
});
Paper Type Settings
dartCopy// Enable/disable label mode (for gap paper)
await PDA608Plugin.setLabelEnabled(true);

// Set the starting position for black label 
await PDA608Plugin.setStartPosition(52);
Example
Check the example directory for a complete demo app showing how to use the plugin.
Limitations

Due to paper limitations, the maximum width for 58mm paper can only be set to 384, and for 80mm paper it can be set to 570.
Only black and white images are currently supported for printing; grayscale images are not supported.
0
likes
0
points
629
downloads

Publisher

unverified uploader

Weekly Downloads

A plugin for PDA-608 barcode scanner and thermal printer integration

Homepage

License

unknown (license)

Dependencies

flutter, plugin_platform_interface

More

Packages that depend on pda_608_plugin

Packages that implement pda_608_plugin