rawand201/kurdish-escpos
A Laravel/PHP package for ESC/POS thermal receipt printing with built-in Kurdish text support, letting you send Kurdish and right-to-left-friendly receipts directly to POS printers from your application.
Install the current line explicitly:
composer require rawand201/kurdish-escpos:^0.5.1
Do not target 0.1.0 through 0.5.0; those Packagist versions are no longer installable because the repository history was rewritten. 0.5.1 contains the same code as 0.5.0, so behaviour is unchanged — only the installable version changed.
First steps:
config/app.php or the appropriate bootstrap file.php artisan vendor:publish --tag=...) and set printer connection details via environment variables rather than hard-coding IPs or device paths.The primary day-to-day use case is printing Kurdish-language receipts/invoices to thermal ESC/POS printers from a Laravel order, POS, or accounting flow.
Keep printing out of the request cycle. Wrap print operations in queued jobs or dedicated service classes. A network printer can be slow or offline; the HTTP request that completes an order should not block on printer I/O.
ProcessOrderReceipt::dispatch($order)->onQueue('printing');
Centralise printer configuration. Put printer host/port, paper width, character encoding, and enabled features in config/ and environment variables. Avoid scattering printer IPs through controllers or jobs.
Build receipts with a formatter/builder layer. Compose receipts from reusable sections — header, order lines, totals, footer, barcode/QR, cut, cash drawer kick. This keeps Kurdish text, alignment, and column widths consistent across receipt types.
Handle Kurdish text deliberately. RTL and Arabic-script Kurdish characters often require the correct printer code page or encoding. Test with the exact printer model and firmware you deploy. Keep a small fixture receipt that exercises Kurdish letters, numbers, and mixed Latin/Kurdish lines.
Integrate via domain events. For example, listen to OrderPaid or InvoiceIssued, then dispatch a print job. Make the job idempotent where possible so retries do not produce duplicate receipts, or clearly document that duplicates are acceptable.
Use a fake transport in tests. If the package exposes a transport or printer abstraction, bind a fake in the test container and assert on the generated ESC/POS payload rather than hitting hardware. At minimum, unit-test receipt formatting separately from the printer connection.
Provide a manual reprint path. Operations teams will need to reprint a receipt without recreating the order. Expose an artisan command or admin action that dispatches the same print job.
0.5.0, republished from cleaned git history. Do not expect behavioural changes or fixes in this version.composer.json, lockfile, CI cache, or deployment script pinned to 0.1.0–0.5.0 will fail. Update constraints to ^0.5.1 and refresh the lockfile.composer update rawand201/kurdish-escpos and commit the updated lockfile.composer dump-autoload and clear Laravel config/package caches in deployment pipelines, especially if the package provider or config was cached.composer.json before upgrading framework versions.^0.5.1 and review release notes before moving to 0.6 or later; minor versions may contain breaking changes.How can I help you explore Laravel packages today?