feat: Etiketten-Seitenlayout auf dem A4-Bogen frei waehlbar
- LabelTemplate bekommt columns/rows (optional, leer = automatisch passend), plus konfigurierbare Raender/Abstaende - damit ein Etikett exakt auf das vorgedruckte Raster eines physischen Etikettenbogens (z.B. Avery) gelegt werden kann statt nur automatisch berechnet - Startposition beim Drucken waehlbar, fuer bereits angebrochene Boegen (erste Seite startet ab der gewaehlten Position, Folgeseiten wieder von vorne)
This commit is contained in:
1 parent
9659b8d266
commit
c6941a797f
11 files changed
+357
-27
No files matched your search
+9
@@ -0,0 +1,9 @@
|
||||
-- Explicit A4 sheet layout per LabelTemplate: columns/rows (nullable, null =
|
||||
-- auto-fit) plus configurable page margins and gaps, so a template can be
|
||||
-- made to match a specific physical label sheet's exact printed grid.
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "columns" INTEGER;
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "rows" INTEGER;
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "marginTopMm" DOUBLE PRECISION NOT NULL DEFAULT 5;
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "marginLeftMm" DOUBLE PRECISION NOT NULL DEFAULT 5;
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "gapXMm" DOUBLE PRECISION NOT NULL DEFAULT 2;
|
||||
ALTER TABLE "LabelTemplate" ADD COLUMN "gapYMm" DOUBLE PRECISION NOT NULL DEFAULT 2;
|
||||
@@ -864,6 +864,17 @@ model LabelTemplate {
|
||||
elements Json @default("[]")
|
||||
widthMm Float @default(90)
|
||||
heightMm Float @default(35)
|
||||
// A4 sheet layout. columns/rows are nullable: null means "auto-fit as many
|
||||
// as fit" (the original behaviour); a real label sheet product (e.g. a
|
||||
// specific Avery SKU) publishes an exact columns/rows/margin/gap grid, so
|
||||
// setting these lets a template's printed positions match the physical,
|
||||
// pre-die-cut sheet instead of just whatever the naive fit computes.
|
||||
columns Int?
|
||||
rows Int?
|
||||
marginTopMm Float @default(5)
|
||||
marginLeftMm Float @default(5)
|
||||
gapXMm Float @default(2)
|
||||
gapYMm Float @default(2)
|
||||
isDefault Boolean @default(false)
|
||||
active Boolean @default(true)
|
||||
createdAt DateTime @default(now())
|
||||
|
||||
Reference in new issue
Block a user