Skip to main content

A comprehensive module for generating ESC/P2 printer sequences from text or images. Supports markdown-like formatting, tables, and various text styles. It includes a comprehensive ESC/P2 decoder.

Project description

epson_escp2

A Python module to generate raw ESC/P2 sequences from structured text or images, including markdown-style formatting, tables, and varying font styles.

The text or the image is converted into the "Transfer Raster image" ESC/P2 command ESC i r c b nL nH mL mH d1......dk and printed as monochrome B/W bitmap in draft/economy mode.

Supported modes:

  • non compressed or "Run Length Encoding" compression method
  • bit length 1, 2, or 3 (small dot: 01, medium dot: 10, large dot 03)

The epson_escp2 module also provides tools for generating maintenance commands and decoding ESC/P2 command sequences.

The ESC/P2 decoder is comprehensive of all the individual command specifications and all remote mode commands described in the "EPSON Programming Guide For 4 Color EPSON Ink Jet Printer XP-410" and it is also able to print and dump tiled images produced by the "Transfer Raster image" ESC/P2 commands.

Epson’s ESC/P2 is Epson’s extended page description language that enables advanced font manipulation, raster graphics, and layout control on Inkjet printers.

Features

  • Convert text with markdown-like formatting to ESC/P2 commands
  • Convert images to ESC/P2 raster data
  • Generate printer maintenance commands (nozzle checks, cleaning)
  • Decode ESC/P2 commands into human-readable format
  • Preview generated images before printing
  • Direct printing support via LPR protocol (if pyprintlpr module is installed)

Full information and usage details at the epson_escp2 GitHub repository.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

epson_escp2-1.0.2.tar.gz (42.2 kB view details)

Uploaded Source

File details

Details for the file epson_escp2-1.0.2.tar.gz.

File metadata

  • Download URL: epson_escp2-1.0.2.tar.gz
  • Upload date:
  • Size: 42.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for epson_escp2-1.0.2.tar.gz
Algorithm Hash digest
SHA256 a7e3e5a74df4b6ec9d3b792a87945f6f074e1514458cea732eb78850ade8960f
MD5 d30ec6b22203c5d1d6638cb13f522b1e
BLAKE2b-256 3c74f345834099e46cccd6b4acb088b622f83cf7f053459aba7e83f5721b5353

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page