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

Maintenance32

Infrequent updates — may be unmaintained

Popularity1

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity16

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://avatars.githubusercontent.com/u/77153715?v=4)[Temant](/maintainers/Slvstar)[@Slvstar](https://github.com/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

[php-http/cache-plugin

PSR-6 Cache plugin for HTTPlug

25126.1M82](/packages/php-http-cache-plugin)[illuminate/http

The Illuminate Http package.

11937.9M6.9k](/packages/illuminate-http)[rdkafka/rdkafka

A PHP extension for Kafka

2.2k24.3k1](/packages/rdkafka-rdkafka)[httpsoft/http-message

Strict and fast implementation of PSR-7 and PSR-17

87965.9k114](/packages/httpsoft-http-message)[mezzio/mezzio-router

Router subcomponent for Mezzio

265.4M90](/packages/mezzio-mezzio-router)[serpapi/google-search-results-php

Get Google, Bing, Baidu, Ebay, Yahoo, Yandex, Home depot, Naver, Apple, Duckduckgo, Youtube search results via SerpApi.com

69127.2k](/packages/serpapi-google-search-results-php)

PHPackages © 2026

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