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. [Utility &amp; Helpers](/categories/utility)
4. /
5. intanode/receiptprinter

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

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

:description

v1.5.0(4y ago)0765MITPHP

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 today

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 41% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

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

1665d 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

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M10](/packages/renatomarinho-laravel-page-speed)[vinkius-labs/laravel-page-speed

Laravel Page Speed

2.5k12.5k1](/packages/vinkius-labs-laravel-page-speed)[emargareten/inertia-modal

Inertia Modal is a Laravel package that lets you implement backend-driven modal dialogs for Inertia apps.

90142.9k](/packages/emargareten-inertia-modal)[wearepixel/laravel-cart

A cart implementation for Laravel

1374.8k](/packages/wearepixel-laravel-cart)[tomshaw/electricgrid

A feature-rich Livewire package designed for projects that require dynamic, interactive data tables.

119.4k](/packages/tomshaw-electricgrid)

PHPackages © 2026

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