Repository navigation
New features: print labels from selected components #12
nachogarglez
started this conversation in
Ideas
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Label Printing Feature
Purpose
The label printing feature allows users to select one or more inventory components and create physical labels for them. It is intended for organizing component drawers, storage boxes, modules, tools, and other workshop inventory.
The feature is available from the Inventory page through the Labels button. It supports both direct printing and PDF export while using the same label layout and rendering logic in both cases.
Functionality
Multiple component selection
Label fields
Each label can include the following fields:
Each field can be enabled or disabled independently. The font size can be selected as Large, Medium, or Small.
The Specifications field includes all available technical data:
Empty values are omitted automatically.
Live preview
<and>buttons navigate through all selected components.1/30.Paper configurations
Two predefined Avery formats are provided:
Users can also create custom paper formats with configurable:
Custom formats can be edited or deleted.
Per-format preferences
The selected label fields and font sizes are stored independently for each paper configuration. Switching between formats restores the field configuration associated with that format.
The application also remembers the last selected paper configuration for the next time the label dialog is opened.
Starting position and calibration
Direct printing
The Print button uses Qt's standard printing workflow:
QPrintDialog.PDF export
The Generate PDF button exports the labels to a PDF file. PDF output uses the same rendering code as direct printing, ensuring consistent positioning and typography.
Localization
The feature is localized in English and French, including:
Technical notes
QSettingsstores custom formats, the last selected paper configuration, and per-format field preferences.Feature preview
Current implementation (preview, draft but already useful) : https://github.com/nachogarglez/ComponentHub/tree/feat_labels
Screenshot
Example generated PDF
componenthub-labels-example.pdf
Example of 8728 paper used for testing
All reactions