{"_id":"@bestimmaa/posprint","_rev":"3-2895f2fe1b6fa8dbf3539efe091aec27","name":"@bestimmaa/posprint","dist-tags":{"latest":"0.2.5"},"versions":{"0.2.3":{"name":"@bestimmaa/posprint","version":"0.2.3","keywords":["epson","tm-t88v","escpos","receipt","thermal-printer","markdown","windows","linux","macos","cups","raw-printing","spooler","cli"],"author":{"name":"bestimmaa"},"license":"MIT","_id":"@bestimmaa/posprint@0.2.3","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint#readme","bugs":{"url":"https://github.com/bestimmaa/posprint/issues"},"bin":{"posprint":"src/print-cli.js"},"dist":{"shasum":"d323d96345aaea78958283a3c30415e0b9635a85","tarball":"https://registry.npmjs.org/@bestimmaa/posprint/-/posprint-0.2.3.tgz","fileCount":15,"integrity":"sha512-0HYbpuG/74aQ9QCM7XpGHDShaxGgiSy+S+9d/GvF01FHzizUAsXg4l+hqAX+cEsvqdD/njJDJGNKM0Lup9wmiQ==","signatures":[{"sig":"MEQCIBkl9UF/3rMnt0/gQWrr1NDRAXvC6o7Z0axEZkIXKiwvAiBaCB3D5GGiIFJz7Qeb3wByQUd+cIYaCKZwaXp8/K8Jrg==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":76346},"main":"src/index.js","engines":{"node":">=20"},"gitHead":"cd1cdc770db7260bdd150db25b541c0c4f06307f","private":false,"scripts":{"test":"node --test tests/*.test.js","print":"node src/print-cli.js","release":"node scripts/release.js","print:dry":"node src/print-cli.js --dry-run","print:test":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md","prepublishOnly":"npm test","print:test:dry":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md --dry-run"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint.git","type":"git"},"_npmVersion":"11.11.0","description":"Markdown-to-ESC/POS receipt printing CLI + Node.js module (Windows RAW + CUPS)","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ipp":"^1.1.0","pngjs":"^7.0.0","jpeg-js":"^0.4.4","markdown-it":"^14.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/posprint_0.2.3_1779547709384_0.2611507421185322","host":"s3://npm-registry-packages-npm-production"}},"0.2.4":{"name":"@bestimmaa/posprint","version":"0.2.4","keywords":["epson","tm-t88v","escpos","receipt","thermal-printer","markdown","windows","linux","macos","cups","raw-printing","spooler","cli"],"author":{"name":"bestimmaa"},"license":"MIT","_id":"@bestimmaa/posprint@0.2.4","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"homepage":"https://github.com/bestimmaa/posprint#readme","bugs":{"url":"https://github.com/bestimmaa/posprint/issues"},"bin":{"posprint":"src/print-cli.js"},"dist":{"shasum":"d78cf86f18846f8a2fa773e6172c6eaadcac4152","tarball":"https://registry.npmjs.org/@bestimmaa/posprint/-/posprint-0.2.4.tgz","fileCount":15,"integrity":"sha512-CHZnDap/E2M00JEGVAfmF0Yjo1wQa64HaPa6G9ES5z4/B0Ls+p7uW4o7rbZVIA0UYzjkMh+wpUBHXxmi7Zs+GQ==","signatures":[{"sig":"MEYCIQDVRI9uXEeni2Nx+KERIVJKnzi5gEElHuWRcqsQaC4chgIhAIrz/970kj9rnxZa7mUJqct2UhcCXWACi+slArBMXaWM","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":74933},"main":"src/index.js","engines":{"node":">=20"},"gitHead":"1a38bdb5928f9a0709782f210b54cd972bb1369c","private":false,"scripts":{"test":"node --test tests/*.test.js","print":"node src/print-cli.js","release":"node scripts/release.js","print:dry":"node src/print-cli.js --dry-run","print:test":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md","prepublishOnly":"npm test","print:test:dry":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md --dry-run"},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"repository":{"url":"git+https://github.com/bestimmaa/posprint.git","type":"git"},"_npmVersion":"11.11.0","description":"Markdown-to-ESC/POS receipt printing CLI + Node.js module (Windows RAW + CUPS)","directories":{},"_nodeVersion":"24.14.1","dependencies":{"ipp":"^1.1.0","pngjs":"^7.0.0","jpeg-js":"^0.4.4","markdown-it":"^14.1.0"},"_hasShrinkwrap":false,"_npmOperationalInternal":{"tmp":"tmp/posprint_0.2.4_1781441835004_0.7303931670585484","host":"s3://npm-registry-packages-npm-production"}},"0.2.5":{"name":"@bestimmaa/posprint","version":"0.2.5","private":false,"description":"Markdown-to-ESC/POS receipt printing CLI + Node.js module (Windows RAW + CUPS)","main":"src/index.js","bin":{"posprint":"src/print-cli.js"},"keywords":["epson","tm-t88v","escpos","receipt","thermal-printer","markdown","windows","linux","macos","cups","raw-printing","spooler","cli"],"author":{"name":"bestimmaa"},"license":"MIT","homepage":"https://github.com/bestimmaa/posprint#readme","bugs":{"url":"https://github.com/bestimmaa/posprint/issues"},"repository":{"type":"git","url":"git+https://github.com/bestimmaa/posprint.git"},"scripts":{"test":"node --test tests/*.test.js","print":"node src/print-cli.js","print:dry":"node src/print-cli.js --dry-run","print:test":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md","print:test:dry":"node src/print-cli.js --markdown-file=tests/fixtures/fixture-markdown-showcase.md --dry-run","release":"node scripts/release.js","prepublishOnly":"npm test"},"dependencies":{"ipp":"^1.1.0","jpeg-js":"^0.4.4","markdown-it":"^14.1.0","pngjs":"^7.0.0"},"engines":{"node":">=20"},"_id":"@bestimmaa/posprint@0.2.5","gitHead":"e4f9b092743959b59e8fd0ede659d511a5c5012f","_nodeVersion":"20.20.2","_npmVersion":"10.8.2","dist":{"integrity":"sha512-1Qf/WtoLIqwGHIv6Xg0WPow5KWzUniKNdgQu4TBEEAjr5mtD03dx0I8/a1cDtlgAhZCyn+nB9ZDbeAOwCtT9wQ==","shasum":"0e3cb77319fcd3af62a680d479beeeb16beda47a","tarball":"https://registry.npmjs.org/@bestimmaa/posprint/-/posprint-0.2.5.tgz","fileCount":15,"unpackedSize":74891,"attestations":{"url":"https://registry.npmjs.org/-/npm/v1/attestations/@bestimmaa%2fposprint@0.2.5","provenance":{"predicateType":"https://slsa.dev/provenance/v1"}},"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIQDjCPyCcDX8DoCCIZd4QoZdUl3p/99Cb32fARJXrT4c3QIgOYSTbUO8J8L3qml+QMNn0l/Me22ff4heGV4mapyRoGs="}]},"_npmUser":{"name":"bestimmaa","email":"christoph.halang@gmail.com"},"directories":{},"maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/posprint_0.2.5_1781477360344_0.4829915119397039"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-23T14:48:29.258Z","modified":"2026-06-14T22:49:20.790Z","0.2.3":"2026-05-23T14:48:29.546Z","0.2.4":"2026-06-14T12:57:15.151Z","0.2.5":"2026-06-14T22:49:20.489Z"},"bugs":{"url":"https://github.com/bestimmaa/posprint/issues"},"author":{"name":"bestimmaa"},"license":"MIT","homepage":"https://github.com/bestimmaa/posprint#readme","keywords":["epson","tm-t88v","escpos","receipt","thermal-printer","markdown","windows","linux","macos","cups","raw-printing","spooler","cli"],"repository":{"type":"git","url":"git+https://github.com/bestimmaa/posprint.git"},"description":"Markdown-to-ESC/POS receipt printing CLI + Node.js module (Windows RAW + CUPS)","maintainers":[{"name":"bestimmaa","email":"christoph.halang@gmail.com"}],"readme":"# posprint\n\n[![CI](https://github.com/bestimmaa/posprint/actions/workflows/ci.yml/badge.svg?branch=main)](https://github.com/bestimmaa/posprint/actions/workflows/ci.yml)\n[![npm](https://img.shields.io/npm/v/@bestimmaa/posprint)](https://www.npmjs.com/package/@bestimmaa/posprint)\n\n`posprint` turns markdown into ESC/POS receipt output for Epson TM-T88V style printers.\n\n- npm: [`@bestimmaa/posprint`](https://www.npmjs.com/package/@bestimmaa/posprint)\n- GitHub: [bestimmaa/posprint](https://github.com/bestimmaa/posprint)\n- Platforms: Windows RAW spooler, Linux CUPS, macOS CUPS — Node.js 20+ required\n- Supported printers: [SUPPORTED_PRINTERS.md](./SUPPORTED_PRINTERS.md)\n- Printer setup (Epson TM-T88V on CUPS): [PRINTER_SETUP.md](./PRINTER_SETUP.md)\n\n## What it does\n\n`posprint` ships as both a CLI and a Node.js module for markdown-to-ESC/POS workflows.\n\n- Build receipt payloads from markdown\n- Dry-run output before sending a real print job\n- Print to a local printer queue or direct IPP/IPPS printer URI\n- Support practical receipt features like inline emphasis, images, QR codes, layout controls, and code pages\n\n## Install\n\nInstall as a project dependency:\n\n```bash\nnpm install @bestimmaa/posprint\n```\n\nInstall the CLI globally:\n\n```bash\nnpm i -g @bestimmaa/posprint\n```\n\n## Quick Start\n\nShow CLI help:\n\n```bash\nposprint --help\n```\n\nDry run inline markdown without contacting a printer:\n\n```bash\nposprint --dry-run --markdown=\"# Hello\\n\\n- Espresso\\n- Croissant\"\n```\n\nPrint to a local queue:\n\n```bash\nposprint --markdown=\"# Hello\\n\\n- Espresso\\n- Croissant\" --printer=\"EPSON TM-T88V Receipt (USB)\"\n```\n\nPrint to a printer URI:\n\n```bash\nposprint --markdown-file=\"./receipt.md\" --printer-uri=\"ipp://taiga.local:631/printers/TM-T88V\"\n```\n\n## CLI\n\n```text\nposprint [options]\n```\n\nCommon options:\n\n- `--markdown-file=<path>` read receipt content from a markdown file\n- `--markdown=\"...\"` pass markdown inline as a single argument\n- `--printer=\"Printer Name\"` target an exact local printer queue\n- `--printer-uri=\"ipp://host:631/printers/queue\"` print directly to an IPP/IPPS printer URI. This takes precedence over `--printer`.\n- `--dry-run` build and inspect output without sending a print job\n- `--strict-markdown` reject unsupported constructs and invalid QR shortcodes\n- `--chars-per-line=<n>` set receipt width, default `42`\n- `--code-page=<name>` set ESC/POS code page, default `cp858`\n- `--font=A|B|C` select the ESC/POS font\n- `--character-spacing-mm=<n>` set character spacing in millimeters\n- `--line-spacing-mm=<n>` set line spacing in millimeters\n- `--left-margin-mm=<n>` set left margin in millimeters\n- `--print-area-width-mm=<n>` set print area width in millimeters\n- `--list-code-pages` print supported code pages\n- `--help` show CLI usage\n- `--version` show package version\n\n`http://.../printers/...` and `https://.../printers/...` inputs are normalized to `ipp://` / `ipps://` with a warning.\n\nPrinter selection order:\n\n1. `--printer`\n2. `ESC_POS_PRINTER`\n3. First printer matching `epson|tm-t88v|receipt`\n4. First detected printer\n\n## Text Conversion Behavior\n\nSupported code pages are `cp437`, `cp850`, `cp858`, and `cp1252`.\n\nText conversion only normalizes these exceptions before encoding:\n\n- smart quotes to ASCII quotes\n- Unicode dashes to `-`\n- non-breaking spaces to regular spaces\n\nOther unsupported characters become `?`.\n\n- The CLI warns when fallback replacement occurs.\n- Module conversion stays silent by default.\n\n## Module API\n\nPackage entry point: `require(\"@bestimmaa/posprint\")`\n\nConvert markdown to ESC/POS bytes without submitting a print job:\n\n```js\nconst { markdownToEscpos } = require(\"@bestimmaa/posprint\");\n\nconst escpos = markdownToEscpos(\"# Dry Run\\n\\n- Tea\\n- Muffin\", {\n  charsPerLine: 42,\n  codePage: \"cp858\",\n  font: \"B\"\n});\n\nconsole.log(`ESC/POS payload bytes: ${escpos.length}`);\n```\n\nFor local queue printing, printer URI printing, available exports, and ESM interop, see the public module API guide:\n\n- [Module API guide](https://github.com/bestimmaa/posprint/blob/main/docs/module-api.md)\n\n## Features\n\n- Inline markdown styling with bold, emphasis, and readable strikethrough handling\n- Markdown image support for `.png`, `.jpg`, and `.jpeg`\n- Native QR shortcode support like `{{qr:https://example.com|size=6|ec=M}}`\n- Layout controls for font, character spacing, line spacing, left margin, and print area width\n- Unicode-to-code-page conversion with `cp858` as the default\n\nShow supported code pages:\n\n```bash\nposprint --list-code-pages\n```\n\n## Development\n\nInstall repository dependencies:\n\n```bash\nnpm install\n```\n\nRun tests:\n\n```bash\nnpm test\n```\n\nHelpful local commands:\n\n- `npm run print -- --help`\n- `npm run print:test:dry`\n- `npm run print:test -- --printer=\"EPSON TM-T88V Receipt (USB)\"`\n\nFor maintainer release steps, see [the release guide](https://github.com/bestimmaa/posprint/blob/main/docs/release.md).\n\n## License\n\nMIT\n","readmeFilename":"README.md"}