PHPackages                             temant/printer - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. temant/printer

ActiveLibrary[HTTP &amp; Networking](/categories/http)

temant/printer
==============

A simple PHP library for interacting with network printers.

01PHP

Since Feb 24Pushed 1y ago1 watchersCompare

[ Source](https://github.com/EmadAlmahdi/Temant-Printer)[ Packagist](https://packagist.org/packages/temant/printer)[ RSS](/packages/temant-printer/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Temant\\Printer Library
=======================

[](#temantprinter-library)

A simple PHP library for interacting with network printers. It allows sending data to printers over the network via the RAW printing protocol.

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

[](#installation)

1. Clone the repository:

    ```
    git clone https://github.com/slvstar/temant-printer.git
    ```
2. Install dependencies using Composer:

    ```
    composer install
    ```

Usage
-----

[](#usage)

### Printer Class

[](#printer-class)

To create a printer instance and print data:

```
use Temant\Printer\Printer;

$printer = new Printer('192.168.1.100', 9100);  // Use the correct IP and port of your printer
$printer->print("Hello Printer!");

echo $printer->getPrinterStatus();  // Output: 'Online' if connected
```

### Exception Handling

[](#exception-handling)

The library throws the following exceptions:

- `PrinterException`: For issues with the printer connection or printing.
- `ConnectionException`: For connection failures.

Running Tests
-------------

[](#running-tests)

To run tests, you need PHPUnit installed:

```
composer require --dev phpunit/phpunit
```

Run the tests:

```
./vendor/bin/phpunit tests
```

PHPStan Analysis
----------------

[](#phpstan-analysis)

To ensure the code follows best practices and type safety, use PHPStan for static analysis:

```
composer require --dev phpstan/phpstan
./vendor/bin/phpstan analyse
```

License
-------

[](#license)

MIT License. See LICENSE file for details.

###  Health Score

14

—

LowBetter than 2% of packages

Maintenance33

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity15

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/3e96f21e803c229bcc4ec2e9b3f83535aa1723c9981a67d95513faee24e27d4f?d=identicon)[Slvstar](/maintainers/Slvstar)

---

Top Contributors

[![EmadAlmahdi](https://avatars.githubusercontent.com/u/135208774?v=4)](https://github.com/EmadAlmahdi "EmadAlmahdi (1 commits)")

### Embed Badge

![Health badge](/badges/temant-printer/health.svg)

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

###  Alternatives

[friendsofsymfony/rest-bundle

This Bundle provides various tools to rapidly develop RESTful API's with Symfony

2.8k73.3M319](/packages/friendsofsymfony-rest-bundle)[php-http/discovery

Finds and installs PSR-7, PSR-17, PSR-18 and HTTPlug implementations

1.3k309.5M1.2k](/packages/php-http-discovery)[pusher/pusher-php-server

Library for interacting with the Pusher REST API

1.5k94.8M293](/packages/pusher-pusher-php-server)[react/http

Event-driven, streaming HTTP client and server implementation for ReactPHP

78026.4M414](/packages/react-http)[php-http/curl-client

PSR-18 and HTTPlug Async client with cURL

48347.0M384](/packages/php-http-curl-client)[smi2/phpclickhouse

PHP ClickHouse Client

84310.1M71](/packages/smi2-phpclickhouse)

PHPackages © 2026

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