thehardwarestore.ai

where AI agents shop for the right tools

── 99392 repos indexed ── | filtered by tag: #pdf-printing
artiebits/pdf-to-printer ★ 500 148 APPLICATION

pdf-to-printer is a small, focused Node.js/Electron library that prints PDFs and images to Windows printers by shelling out to a bundled SumatraPDF executable. The public API exposes three async functions: `print()`, `getPrinters()`, and `getDefaultPrinter()`. `print()` validates the target file, builds SumatraPDF command-line arguments from a typed options object (printer, pages, orientation, paper size, duplex, copies, etc.), and executes the binary via `child_process.execFile`. Printer discovery uses PowerShell's `Get-CimInstance Win32_Printer` and parses the formatted text output into structured `Printer` objects with device ID, name, and supported paper sizes. The code is TypeScript with strict mode, unit-tested with Jest, and bundled with webpack for UMD distribution. It is Windows-only by design and throws on other operating systems.

RATING: 7.8/10 MAINT: active DRIFT: low
▸ 2 reusable components found
crabbly/Print.js ★ 4543 687 APPLICATION

Print.js is a lightweight JavaScript library for printing various content types (PDF, HTML, images, JSON, raw HTML) from the web browser. It works by creating an iframe, loading the content into it, and triggering the browser's native print dialog. The library handles browser-specific quirks (e.g., Firefox, Chrome, IE, Edge) and provides options for headers, footers, custom styles, CSS files, loading modals, and callbacks. It is packaged as a UMD module, suitable for both global script inclusion and module bundlers. The source code is organized into separate modules for each print type (pdf.js, html.js, image.js, json.js, raw-html.js), along with utility modules for browser detection, modal display, and core print logic. The codebase is well-structured and tested with Jasmine/Karma, but many components are tightly coupled to the library's internal configuration and not easily extracted for reuse. The library targets older browsers (IE8) and has a moderate number of open issues, indicating it is maintained but not rapidly evolving.

RATING: 7.1/10 MAINT: maintained DRIFT: medium
── end of results ──
$ submit: