Intranet / Labels
Turning spreadsheet data into labels.
The label generator combines saved layouts with Excel data. Dynamic text fields take their values from mapped columns. It produces PDF pages in label format, with QR content derived from the same fields when the layout includes a QR component.
Excel columns → Template fields
- A Project
- P-014
- B Position
- S-021
- C Description
- Part A
The template defines the layout. The data row supplies the content.
PDF · Label format
Part A
One label page per data row.
The problem
The same layout, changing content
Project and position data change from row to row. The label layout needs to remain reusable without preparing every label individually.
The decision
Keep layout and data separate
The template stores components, positions and column mappings. Generation inserts the Excel values into that structure.
The result
A series of PDF labels
Processed rows become individual label pages. When configured grouping values change in the data sequence, the generator starts a new PDF file.
The decisions behind it
1. Fields instead of fixed content
The graphical designer maps dynamic text fields to Excel columns. The generator converts column letters into indices and reads values from the current data row. The saved layout remains separate.
2. From the editor to PDF format
Component positions and sizes are converted into millimeters for output. Text, shapes, rotations, logos and QR components have separate PDF rendering paths. Each processed data row creates one page in label format.
3. Split files along the data sequence
Up to three configured Excel columns determine file boundaries. When their values change as the rows are processed, a new PDF file begins. The order of the input data is significant.
Tech stack
Symfony · Doctrine DBAL · Twig · Stimulus · Konva · PhpSpreadsheet · TCPDF
This module belongs to the same internal Symfony intranet as the manufacturing workflow and the other modules shown here.