atans / bpac
Brother label printing b-PAC php library (Windows Only)
Installs: 205
Dependents: 0
Suggesters: 0
Security: 0
Stars: 14
Watchers: 3
Forks: 3
Open Issues: 1
Type:api
Requires
- php: >=5.4.5
- ext-com_dotnet: *
Requires (Dev)
This package is auto-updated.
Last update: 2024-12-13 23:26:22 UTC
README
Brother label printing b-PAC php library (Windows Only)
Installation
Step 1.Install Labelling SDK (b-PAC)
Download and install Full b-PAC SDK for developers (SDK, User Guide & sample programs)
Step 2.Composer install atans/bpac
The preferred way to install this extension is through composer.
Either run
composer require atans/bpac
or add
"atans/bpac": "*"
to the require section of your composer.json
file.
Usage
use atans\bpac\Printer; use atans\bpac\Document; $printer = new Printer(); $installedPrinters = $printer->GetInstalledPrinters(); // Same as // $printer = new Com('bpac.Printer')); // $installedPrinters = $printer->GetInstalledPrinters(); // Print label using lbx template $document = new Document(); $document->Open(realpath(__DIR__ . '/tests/assets/device.lbx')) $document->GetObject('brand')->Text = 'ThinkPad'; $document->StartPrint('', PrintOptionConstants::bpoDefault); $document->PrintOut(1, PrintOptionConstants::bpoDefault); $document->EndPrint(); $document->Close();