Catalog npm
Back to packageRELEASE DETAILS

1.2.1

npm

4ps-printer

Printer service for internal use at Pizza4Ps

printer
Published21 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": "d29f46fb044eaf74fce9f54047c0ad29d23c4169",
  "tarball": "https://registry.npmjs.org/4ps-printer/-/4ps-printer-1.2.1.tgz",
  "fileCount": 40,
  "integrity": "sha512-I3lCduK1NpMwSolV5qwSegTErpPkVWTO/ziNJakwC+oW6tPeK8JdpAnoURiuSoGxroC03OxYMCcVz/3S0thHqQ==",
  "signatures": [
    {
      "sig": "MEUCIEs6O+ssuXvUuUFqjtuRsG867ZvdzVFtZbeOtWiDiWwIAiEAvC1bmpfl60VxlE6+1hBuL7/2eyD+dO8gN6P96yfrHJE=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 285612
}

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:cf182fa1f496b91536a017547020e2ab9ae508b85f6404ebfd0429819de71df6

Other collected versions

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