Catalog npm
Back to packageRELEASE DETAILS

1.0.3

npm

4ps-printer

Printer service for internal use at Pizza4Ps

printer
Published10 Nov 2025
Direct dependencies9
Transitive dependenciesNot calculated

README

Current package documentation

4ps-printer-js

A comprehensive printing library for receipt printers supporting multiple protocols and connection types including ESC/POS, Star, and SII protocols over network, serial, and USB connections.

Features

  • Multiple Protocol Support: ESC/POS, ESC/POS SII, Star, PNG
  • Flexible Connections: Network (TCP/IP), Serial Port, USB Device
  • TypeScript Support: Full type definitions included
  • Modern API: Promise-based with async/await support
  • Markdown Printing: Convert markdown to receipt format

Installation

npm install 4ps-printer

Quick Start

import { Printer, PrinterConfig } from '4ps-printer';

const printer = new Printer();
const options = {
  destination: '192.168.1.100',
  printer: 'escpos',
  charactersPerLine: 48
};

const result = await printer.printMarkdown('# Receipt\n\nTotal: $10.00', options, page);

API Reference

Printer Class

The main class for handling print operations.

Methods

  • printMarkdown(content: string, options: IPrintOptions, page?: any): Promise<any>

PrinterConfig

Configuration class for printer settings.

ConnectionManager

Manages different types of printer connections.

Supported Protocols

  • ESC/POS: Standard receipt printer protocol
  • ESC/POS SII: SII variant of ESC/POS
  • Star: Star Micronics printer protocol
  • PNG: Image-based printing

Supported Connections

  • Network (TCP/IP): Connect via IP address and port
  • Serial Port: Direct serial connection
  • USB Device: USB-connected printers

License

ISC

Support

For issues and questions, please visit our GitHub repository.

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 9

Native requirements
9 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
uuid
Environment
{
  "local_name": "uuid",
  "alias": false,
  "peer_metadata": null
}
10.0.0runtime
pngjs
Environment
{
  "local_name": "pngjs",
  "alias": false,
  "peer_metadata": null
}
7.0.0runtime
iconv-lite
Environment
{
  "local_name": "iconv-lite",
  "alias": false,
  "peer_metadata": null
}
0.7.0runtime
serialport
Environment
{
  "local_name": "serialport",
  "alias": false,
  "peer_metadata": null
}
13.0.0runtime
receiptline
Environment
{
  "local_name": "receiptline",
  "alias": false,
  "peer_metadata": null
}
1.16.0runtime
puppeteer-core
Environment
{
  "local_name": "puppeteer-core",
  "alias": false,
  "peer_metadata": null
}
24.15.0runtime
typescript
Environment
{
  "local_name": "typescript",
  "alias": false,
  "peer_metadata": null
}
5.9.2development
@types/uuid
Environment
{
  "local_name": "@types/uuid",
  "alias": false,
  "peer_metadata": null
}
10.0.0development
@types/pngjs
Environment
{
  "local_name": "@types/pngjs",
  "alias": false,
  "peer_metadata": null
}
6.0.5development

Distribution files

1 collected
Distribution 1

Source distribution

Source file
Checksums from source
{
  "shasum": "55dea505f642d5c327c7f503e38897d69b595a0c",
  "tarball": "https://registry.npmjs.org/4ps-printer/-/4ps-printer-1.0.3.tgz",
  "fileCount": 40,
  "integrity": "sha512-+p6XQEAJKvcMi12bv7WVoJxlxoYkX1ihlCXSqKI1g1HbIL2f8jfCbao5hGjBcu6v5lGgzK81qkHE4bcomlRWkg==",
  "signatures": [
    {
      "sig": "MEUCIHq7Ecd27bvDQQ9blhZ8Vzj4sUMQC2ANPJWjFaXkxDGQAiEAhWnCGA156mC04YJetQjryuluOgiN7eS8H873Vv+DX4c=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 283554
}

Repository

PENDING
pizza4ps-technologies/4ps-printer-js

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 20:14 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:cd4d9ba60b2a1deb15e237cd614bc889f8c0b5a476d58bf7494741fc747992eb

Other collected versions

1.2.221 Nov1.2.121 Nov1.2.021 Nov1.1.121 Nov1.1.021 Nov1.0.621 NovView all collected versions →