Catalog npm
Back to packageRELEASE DETAILS

1.1.1

npm

4ps-printer

Printer service for internal use at Pizza4Ps

printer
Published21 Nov 2025
Direct dependencies10
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 10

Native requirements
10 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
puppeteer
Environment
{
  "local_name": "puppeteer",
  "alias": false,
  "peer_metadata": null
}
24.31.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": "81cce1b7a6806cab37dfd2c29ec29ce839102f99",
  "tarball": "https://registry.npmjs.org/4ps-printer/-/4ps-printer-1.1.1.tgz",
  "fileCount": 43,
  "integrity": "sha512-c3SCCv6CeWcq9u5J0Q9JP7REVoTdOiUJ1CQW3t4AS8x0S6aLXmY5a9PTnLD0ykHAOqL6DOrrdeoodedbsUVLYw==",
  "signatures": [
    {
      "sig": "MEUCIQDkAgaH6QqD6Te2zXPIFG83I+4X0SYndbI1peVo1+o0MQIgUy2zmzsN/VKG5OBoViwPns9KK5P8FEWRBM1RbURzKcM=",
      "keyid": "SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"
    }
  ],
  "unpackedSize": 298144
}

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:416aaed0ac4dc907e0c413e00dafde9bf243fb2df2a7532bbb7a3edfab35ff83

Other collected versions

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