PHPackages                             alves/escpos-php - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. alves/escpos-php

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

alves/escpos-php
================

PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers

v1.0.1(5mo ago)181MITPHPPHP &gt;=7.0.0

Since Jan 19Pushed 5mo agoCompare

[ Source](https://github.com/andersonav/escpos-php)[ Packagist](https://packagist.org/packages/alves/escpos-php)[ Docs](https://github.com/alves/escpos-php)[ RSS](/packages/alves-escpos-php/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (3)Versions (3)Used By (1)

ESC/POS Print Driver for PHP
============================

[](#escpos-print-driver-for-php)

[![Build Status](https://camo.githubusercontent.com/4d2c397aa07a7c6fd3c8c09dc6ee29b9a76e602d0c00b9c14474a86b87256fff/68747470733a2f2f7472617669732d63692e6f72672f616c7665732f657363706f732d7068702e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/alves/escpos-php)[![Latest Stable Version](https://camo.githubusercontent.com/ccb163f2106fa55568b6e0f6a07de6a624d73883ae4fff7eddc08dc4095631d6/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f657363706f732d7068702f762f737461626c65)](https://packagist.org/packages/alves/escpos-php)[![Total Downloads](https://camo.githubusercontent.com/3e76ce3e0fa3bb07f4fc6a55ec748e92a21bfb37c50baf1ea5829a0f691d7427/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f657363706f732d7068702f646f776e6c6f616473)](https://packagist.org/packages/alves/escpos-php)[![License](https://camo.githubusercontent.com/7ca519cc131bd799870b62abcad8501b77383de753829b77d7f91af7ad3dc965/68747470733a2f2f706f7365722e707567782e6f72672f616c7665732f657363706f732d7068702f6c6963656e7365)](https://packagist.org/packages/alves/escpos-php)[![Coverage Status](https://camo.githubusercontent.com/c70412c6bddcc45451984c19349964f83191317c0e082835dfe6ca101fa553a0/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6769746875622f616c7665732f657363706f732d7068702f62616467652e7376673f6272616e63683d646576656c6f706d656e74)](https://coveralls.io/github/alves/escpos-php?branch=development)

A PHP library implementing a **subset of Epson’s ESC/POS protocol** for thermal receipt printers.

It allows PHP applications to generate and print receipts with **text formatting, images, barcodes, QR codes, paper cutting and cash drawer control**, without relying on vendor-specific SDKs.

This library is suitable for **web-based POS systems**, desktop services and server-side printing workflows.

---

✨ Features
----------

[](#-features)

- ESC/POS command abstraction for PHP
- Multiple connection types (USB, serial, network, CUPS, SMB, LPT)
- Text formatting, alignment and styles
- Image printing (with optional GD / Imagick acceleration)
- Barcode, QR Code and PDF417 support
- Cash drawer control
- Capability profiles for different printer models

---

🖨️ Compatibility
----------------

[](#️-compatibility)

### Interfaces &amp; Operating Systems

[](#interfaces--operating-systems)

This driver is known to work with the following OS / interface combinations:

InterfaceLinuxmacOSWindowsEthernetYesYesYesUSBYesNot testedYesUSB-SerialYesYesYesSerialYesYesYesParallelYesNot testedYesSMB SharedYesNoYesCUPS HostedYesYesNoSee the [`example/interface/`](https://github.com/alves/escpos-php/tree/master/example/interface) directory for working examples.

---

### Supported Printers

[](#supported-printers)

Many ESC/POS-compatible printers are known to work with this library, including models from:

- Epson
- Bematech
- Elgin
- Bixolon
- Star
- Daruma
- Rongta
- Xprinter
- Zjiang
    *(and many others — see full list above)*

If your printer works and is not listed, please [open an issue](https://github.com/alves/escpos-php/issues/new) so it can be added.

---

🚀 Installation
--------------

[](#-installation)

### Requirements

[](#requirements)

- PHP **7.3 or newer**
- `json` extension
- `intl` extension
- `zlib` extension

Optional (recommended for better image performance):

- `gd`
- `imagick`

---

### Composer

[](#composer)

```
composer require alves/escpos-php
```

### Basic Usage

[](#basic-usage)

```
text("Hello World!\n");
$printer->cut();
$printer->close();
```

###  Health Score

30

—

LowBetter than 62% of packages

Maintenance71

Regular maintenance activity

Popularity6

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity31

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

165d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/fec03576723f1006aa8d355fc6b99baf9969bd016cbe5550eb7f13978e14a984?d=identicon)[andersonav](/maintainers/andersonav)

---

Top Contributors

[![andersonav](https://avatars.githubusercontent.com/u/38483866?v=4)](https://github.com/andersonav "andersonav (2 commits)")

---

Tags

printerbarcodeEpsonescposreceipt-printer

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/alves-escpos-php/health.svg)

```
[![Health](https://phpackages.com/badges/alves-escpos-php/health.svg)](https://phpackages.com/packages/alves-escpos-php)
```

###  Alternatives

[mike42/escpos-php

PHP receipt printer library for use with ESC/POS-compatible thermal and impact printers

2.8k2.1M25](/packages/mike42-escpos-php)[ayeo/gs1_barcode

Generate GS1-128 standard barcode

52119.6k](/packages/ayeo-gs1-barcode)[bitgrave/barcode-bundle

provide barcode rendering service into your Symfony2 application.

24447.2k1](/packages/bitgrave-barcode-bundle)[z38/metzli

PHP library to generate Aztec barcodes

26330.2k](/packages/z38-metzli)[ramytalal/label-printer

An implementation of the Brother label printer API.

6543.4k](/packages/ramytalal-label-printer)[nfephp-org/posprint

Thermal POS printer library

7134.3k2](/packages/nfephp-org-posprint)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
