mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-08-03 23:21:44 +00:00
Adds a "Print to Niimbot" panel to the label generator dialog that sends the generated label straight to a Niimbot thermal printer (e.g. B1) over Web Bluetooth, without a PDF print dialog or printer driver. The existing server-side DomPDF label is reused as-is: a new Stimulus controller rasterizes the PDF preview page-by-page with pdf.js at the printer's native resolution, converts it to a 1-bit bitmap and prints it via the niimbluelib library. No changes to the PHP label pipeline are required. The feature is disabled by default and gated behind the NIIMBOT_ENABLED environment variable, since it is only useful for users who own such a printer. - Add @mmote/niimbluelib and pdfjs-dist dependencies - New assets/controllers/pages/niimbot_print_controller.js - Print options (copies, density, label type, rotation, B/W threshold) in the label dialog, gracefully disabled when Web Bluetooth is unavailable - NIIMBOT_ENABLED env flag (off by default), wired through parameters.yaml and a Twig global, documented in .env - English translations and documentation Requires a Chromium-based browser and a secure context (HTTPS or localhost). |
||
|---|---|---|
| .. | ||
| admin | ||
| attachments | ||
| bundles/TwigBundle/Exception | ||
| components | ||
| form | ||
| info_providers | ||
| label_system | ||
| log_system | ||
| parts | ||
| projects | ||
| security | ||
| settings | ||
| tools | ||
| users | ||
| _navbar.html.twig | ||
| _sidebar.html.twig | ||
| _toast.html.twig | ||
| _toast_container.html.twig | ||
| _turbo_control.html.twig | ||
| attachment_list.html.twig | ||
| base.html.twig | ||
| helper.twig | ||
| homepage.html.twig | ||
| main_card.html.twig | ||
| vars.macro.twig | ||