PHPackages                             intanode/receiptprinter - 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. intanode/receiptprinter

ActiveLibrary

intanode/receiptprinter
=======================

:description

v1.5.0(4y ago)0737MITPHP

Since Dec 12Pushed 4y ago1 watchersCompare

[ Source](https://github.com/IntanodeTechnologies/receipt-printer)[ Packagist](https://packagist.org/packages/intanode/receiptprinter)[ Docs](https://github.com/IntanodeTechnologies/receipt-printer)[ RSS](/packages/intanode-receiptprinter/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (1)Dependencies (6)Versions (2)Used By (0)

Laravel Receipt Printer
=======================

[](#laravel-receipt-printer)

Simple Laravel package to integrate ESC/POS Print Driver for PHP.

Installation
------------

[](#installation)

Via Composer

```
$ composer require intanode/receiptprinter
```

Usage
-----

[](#usage)

Execute the following command to publish the config used by this package:

```
$ php artisan vendor:publish --tag=receiptprinter.config

```

Edit the config file located at `config/receiptprinter.php` as follows:

1. Set `connector_type` to:
    - `windows` if you are using Windows as your web server.
    - `cups` if you are using Linux or Mac as your web server.
    - `network` if you are using a network printer.
2. Set `connector_descriptor` to:
    - the printer name if your `connector_type` is either `windows` or `cups`
    - the IP address or Samba URI, e.g: `smb://192.168.0.5/PrinterName` if your `connector_type` is `network`
3. Set `connector_port` to the open port for the printer, only if your `connector_type` is `network`

Include the library:

```
use Intanode\ReceiptPrinter\ReceiptPrinter as ReceiptPrinter;

```

Then use any one of these two functions to send "print" command to the printer.

```
printReceipt()

```

```
printRequest()

```

Example (Print Receipt)
-----------------------

[](#example-print-receipt)

```
use Intanode\ReceiptPrinter\ReceiptPrinter as ReceiptPrinter;

...

// Set params
$mid = '123123456';
$store_name = 'YOURMART';
$store_address = 'Mart Address';
$store_phone = '1234567890';
$store_email = 'yourmart@email.com';
$store_website = 'yourmart.com';
$tax_percentage = 10;
$transaction_id = 'TX123ABC456';
$currency = 'Rp';

// Set items
$items = [
    [
        'name' => 'French Fries (tera)',
        'qty' => 2,
        'price' => 65000,
    ],
    [
        'name' => 'Roasted Milk Tea (large)',
        'qty' => 1,
        'price' => 24000,
    ],
    [
        'name' => 'Honey Lime (large)',
        'qty' => 3,
        'price' => 10000,
    ],
    [
        'name' => 'Jasmine Tea (grande)',
        'qty' => 3,
        'price' => 8000,
    ],
];

// Init printer
$printer = new ReceiptPrinter;
$printer->init(
    config('receiptprinter.connector_type'),
    config('receiptprinter.connector_descriptor')
);

// Set store info
$printer->setStore($mid, $store_name, $store_address, $store_phone, $store_email, $store_website);

// Set currency
$printer->setCurrency($currency);

// Add items
foreach ($items as $item) {
    $printer->addItem(
        $item['name'],
        $item['qty'],
        $item['price']
    );
}
// Set tax
$printer->setTax($tax_percentage);

// Calculate total
$printer->calculateSubTotal();
$printer->calculateGrandTotal();

// Set transaction ID
$printer->setTransactionID($transaction_id);

// Set qr code
$printer->setQRcode([
    'tid' => $transaction_id,
]);

// Print receipt
$printer->printReceipt();

```

Example (Print Request)
-----------------------

[](#example-print-request)

```
use Intanode\ReceiptPrinter\ReceiptPrinter as ReceiptPrinter;

...

// Set params
$mid = '123123456';
$store_name = 'YOURMART';
$store_address = 'Mart Address';
$store_phone = '1234567890';
$store_email = 'yourmart@email.com';
$store_website = 'yourmart.com';
$tax_percentage = 10;
$transaction_id = 'TX123ABC456';
$currency = 'Rp';

// Init printer
$printer = new ReceiptPrinter;
$printer->init(
    config('receiptprinter.connector_type'),
    config('receiptprinter.connector_descriptor')
);

// Set store info
$printer->setStore($mid, $store_name, $store_address, $store_phone, $store_email, $store_website);

// Set currency
$printer->setCurrency($currency);

// Set request amount
$printer->setRequestAmount($request_amount);

// Set transaction ID
$printer->setTransactionID($transaction_id);

// Set qr code
$printer->setQRcode([
    'tid' => $transaction_id,
    'amount' => $request_amount,
]);

// Print payment request
$printer->printRequest();

```

Changelog
---------

[](#changelog)

Please see the [changelog](changelog.md) for more information on what has changed recently.

Credits
-------

[](#credits)

- *Mike42* for the awesome [PHP ESC/POS Print Driver](https://github.com/mike42/escpos-php "PHP ESC/POS Print Driver") library

License
-------

[](#license)

MIT. Please see the [license file](license.md) for more information.

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity15

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity49

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 69.4% 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

Unknown

Total

1

Last Release

1616d ago

### Community

Maintainers

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

---

Top Contributors

[![charlieuki](https://avatars.githubusercontent.com/u/45746232?v=4)](https://github.com/charlieuki "charlieuki (25 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (4 commits)")[![EmmanuelObua](https://avatars.githubusercontent.com/u/45915845?v=4)](https://github.com/EmmanuelObua "EmmanuelObua (3 commits)")[![animaster](https://avatars.githubusercontent.com/u/2392133?v=4)](https://github.com/animaster "animaster (2 commits)")[![MustafaRaarujeed](https://avatars.githubusercontent.com/u/14356467?v=4)](https://github.com/MustafaRaarujeed "MustafaRaarujeed (2 commits)")

---

Tags

laravelReceiptPrinter

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/intanode-receiptprinter/health.svg)

```
[![Health](https://phpackages.com/badges/intanode-receiptprinter/health.svg)](https://phpackages.com/packages/intanode-receiptprinter)
```

###  Alternatives

[charlieuki/receiptprinter

:description

15140.3k](/packages/charlieuki-receiptprinter)[slowlyo/owl-admin

基于 laravel、amis 开发的后台框架~

61214.2k26](/packages/slowlyo-owl-admin)[erag/laravel-disposable-email

A Laravel package to detect and block disposable email addresses.

226102.4k](/packages/erag-laravel-disposable-email)[highsolutions/eloquent-sequence

A Laravel package for easy creation and management sequence support for Eloquent models with elastic configuration.

121130.3k](/packages/highsolutions-eloquent-sequence)[glhd/linen

21135.6k](/packages/glhd-linen)

PHPackages © 2026

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