npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@crowsgear/escl-protocol-scanner

v1.1.0

Published

eSCL/AirPrint Protocol Scanner Library - HTTP-based network scanner support with mDNS discovery

Readme

@crowsgear/escl-protocol-scanner

Network scanner library based on eSCL/AirPrint protocol.

Note: This library only supports network-connected scanners (WiFi or LAN). USB scanners are not supported.

Installation

npm install @crowsgear/escl-protocol-scanner
# or
yarn add @crowsgear/escl-protocol-scanner

No Python installation required! Pre-built binaries for Windows, macOS, and Linux are included.

Quick Start

import { eSCLScanner } from '@crowsgear/escl-protocol-scanner';

// 1. Discover scanners
const result = await eSCLScanner.discoverScanners(10000);
if (result.success && result.data.length > 0) {
  console.log('Found scanners:', result.data);
}

// 2. Get scanner capabilities
const scanner = result.data[0];
const capabilities = await eSCLScanner.getCapabilities(scanner);
console.log('Resolutions:', capabilities?.resolutions);
console.log('Color modes:', capabilities?.colorModes);

// 3. Perform scan
const filePaths = await eSCLScanner.quickScan({
  scanner: scanner,
  dpi: 300,
  mode: 'color',
  source: 'Platen',
  documentFormat: 'image/jpeg',
  savePath: '/path/to/save',
});
console.log('Saved files:', filePaths);

API

eSCLScanner

Default instance, ready to use.

import { eSCLScanner } from '@crowsgear/escl-protocol-scanner';

// Discover scanners
const result = await eSCLScanner.discoverScanners(timeout?: number);

// Get scanner capabilities
const caps = await eSCLScanner.getCapabilities(scanner: IESCLScanner);

// Quick scan
const files = await eSCLScanner.quickScan(params: IQuickScanParams);

// Create scan job
const jobId = await eSCLScanner.createScanJob(scanner, dpi, colorMode, source, documentFormat, width?, height?);

// Get scan job status
const status = await eSCLScanner.getScanJobStatus(scanner, jobId);

// Download image
const buffer = await eSCLScanner.downloadImage(scanner, imageUrl);

Application (Custom Configuration)

Create a new instance for custom configuration.

import { Application } from '@crowsgear/escl-protocol-scanner';

const myScanner = new Application({
  timeout: 15000,
  debug: true,
});

const result = await myScanner.discoverScanners();

quickScan Parameters

interface IQuickScanParams {
  scanner: IESCLScanner;         // Scanner device
  dpi: number;                    // Resolution (e.g., 200, 300, 600)
  mode: 'bw' | 'gray' | 'color';  // Color mode
  source: 'Platen' | 'Feeder';    // Scan source (flatbed/ADF)
  documentFormat: string;         // MIME type (e.g., 'image/jpeg')
  savePath?: string;              // Save path (default: cwd)
  width?: number;                 // Scan width in mm (default: 210)
  height?: number;                // Scan height in mm (default: 297)
  timeout?: number;               // Timeout in ms
}

Types

interface IESCLScanner {
  name: string;
  host: string;
  port: number;
  model?: string;
  manufacturer?: string;
}

interface IESCLCapabilities {
  resolutions: number[];
  colorModes: ('BlackAndWhite1' | 'Grayscale8' | 'RGB24')[];
  sources: ('Platen' | 'Adf' | 'Feeder')[];
  documentFormats: string[];
  maxWidth?: number;
  maxHeight?: number;
}

interface IDiscoveryResponse {
  success: boolean;
  data: IESCLScanner[];
  error?: string;
}

Paper Size Reference

| Paper | Width (mm) | Height (mm) | |--------|------------|-------------| | A4 | 210 | 297 | | A3 | 297 | 420 | | Letter | 216 | 279 | | Legal | 216 | 356 |

Supported Scanners

AirPrint/eSCL compatible network scanners:

  • Canon iR-ADV series
  • HP LaserJet MFP
  • Xerox WorkCentre
  • Epson WorkForce Pro
  • Other AirPrint compatible MFPs

Development

For development without pre-built binaries, you can use Python directly:

pip install zeroconf pillow
import { Application } from '@crowsgear/escl-protocol-scanner';

const scanner = new Application({
  pythonPath: '/path/to/.venv/bin/python3',
});

const result = await scanner.discoverScanners();

Note: When pre-built binaries exist, they take priority over Python scripts.

License

MIT