feat(plot): custom paper sizes with printable margins

AutoCAD lets a plotter configuration carry user-defined sheets; a drawing
then names them like any other media (`Roll_24_(609.60_x_1500.00_MM)`).
The plot dialog now defines such sheets inline, under the Size row:
name, width/height, unit, and the printable margins in that unit. Added
sheets are selected at once, offered for every device after the device's
own list, remembered in the plot config across sessions, and written to
the layout with their own margins (a printer that reports the same size
still wins with its hardware margins). A selected user-defined sheet can
be removed; the sheet itself stays selectable in the drawing that uses it.

`CustomPaper` / `Margins` live in the paper catalogue with serde support;
`PlotDevice::margins_mm` consults the user's definitions. The Plot
dialog's form helpers (button and field styles, dividers, `label :
control` rows) move to `ui::style::form` so the next dialogs share them
instead of copying.

Tests: draft validation and seeding, catalogue naming of user sheets,
device margins with user definitions, and dialog round-trips (add,
select, persist, write, replace, remove, refuse an invalid size).

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
This commit is contained in:
PanosandClaude Opus 5 committed 2026-09-16 16:05:47 +03:00
1 parent a7c89eca33
commit 5e271e2dbb
28 files changed
+930 -175

No files matched your search

+3
View File
@@ -5026,6 +5026,9 @@ plot =
.fit-to-paper = ملاءمة للورق
.layout-plots-the-current-sheet-using-the-selec = يطبع التخطيط الورقة الحالية باستخدام حجم الورق المحدد.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = دمج الخطوط المتداخلة
.object-lineweights = سماكات خطوط الكائنات
.orientation = الاتجاه
+3
View File
@@ -5014,6 +5014,9 @@ plot =
.fit-to-paper = Побери в хартията
.layout-plots-the-current-sheet-using-the-selec = Оформлението плотира текущия лист, използвайки избрания размер хартия.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Обедини припокриващи се линии
.object-lineweights = Дебелини на линии на обект
.orientation = Ориентация
+3
View File
@@ -5011,6 +5011,9 @@ plot =
.fit-to-paper = Přizpůsobit papíru
.layout-plots-the-current-sheet-using-the-selec = Rozvržení vykreslí aktuální list pomocí zvolené velikosti papíru.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Sloučit překrývající se čáry
.object-lineweights = Tloušťky čar objektů
.orientation = Orientace
+3
View File
@@ -5012,6 +5012,9 @@ plot =
.fit-to-paper = An Papier anpassen
.layout-plots-the-current-sheet-using-the-selec = Das Layout plottet das aktuelle Blatt mit dem ausgewählten Papierformat.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Zusammenführung überlappender Leitungen
.object-lineweights = Objektliniengewichte
.orientation = Ausrichtung
+3
View File
@@ -5014,6 +5014,9 @@ plot =
.fit-to-paper = Προσαρμογή στο χαρτί
.layout-plots-the-current-sheet-using-the-selec = Η επιλογή Διάταξη εκτυπώνει το τρέχον φύλλο με το επιλεγμένο μέγεθος χαρτιού.
.sheet-sizes-and-printable-areas-reported-by-th = Μεγέθη φύλλων και εκτυπώσιμες περιοχές όπως τα αναφέρει ο εκτυπωτής.
.custom-paper-size = Προσαρμοσμένο μέγεθος χαρτιού
.printable-margins = Εκτυπώσιμα περιθώρια
.enter-a-positive-width-and-height = Δώστε θετικό πλάτος και ύψος.
.merge-overlapping-lines = Συγχώνευση επικαλυπτόμενων γραμμών
.object-lineweights = Πάχη γραμμών αντικειμένων
.orientation = Προσανατολισμός
+3
View File
@@ -5015,6 +5015,9 @@ plot =
.fit-to-paper = Fit to paper
.layout-plots-the-current-sheet-using-the-selec = Layout plots the current sheet using the selected paper size.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Merge overlapping lines
.object-lineweights = Object lineweights
.orientation = Orientation
+3
View File
@@ -5014,6 +5014,9 @@ plot =
.fit-to-paper = Ajustar al papel
.layout-plots-the-current-sheet-using-the-selec = La presentación traza la hoja actual con el tamaño de papel seleccionado.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Fusionar líneas solapadas
.object-lineweights = Grosores de línea de objetos
.orientation = Orientación
+3
View File
@@ -5013,6 +5013,9 @@ plot =
.fit-to-paper = Sovita paperille
.layout-plots-the-current-sheet-using-the-selec = Asettelu piirtää nykyisen arkin käyttämällä valittua paperikokoa.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Yhdistä päällekkäiset rivit
.object-lineweights = Objektin viivan painot
.orientation = Suuntautuminen
+3
View File
@@ -5014,6 +5014,9 @@ plot =
.fit-to-paper = Ajuster au papier
.layout-plots-the-current-sheet-using-the-selec = La présentation trace la feuille courante avec le format de papier sélectionné.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Fusionner les lignes qui se chevauchent
.object-lineweights = Poids de ligne d'objet
.orientation = Orientation
+3
View File
@@ -5002,6 +5002,9 @@ plot =
.fit-to-paper = कागज़ पर फ़िट करें
.layout-plots-the-current-sheet-using-the-selec = लेआउट चयनित कागज़ आकार पर वर्तमान शीट प्लॉट करता है।
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = मर्ज ओवरलैपिंग लाइन
.object-lineweights = ऑब्जेक्ट लाइनवेट
.orientation = अभिविन्यास
+3
View File
@@ -5013,6 +5013,9 @@ plot =
.fit-to-paper = Papírra illeszthető
.layout-plots-the-current-sheet-using-the-selec = Az Elrendezés az aktuális lapot a kiválasztott papírmérettel ábrázolja.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Egyesítse az átfedő vonalakat
.object-lineweights = Objektumvonalvastagságok
.orientation = Tájékozódás
+3
View File
@@ -5013,6 +5013,9 @@ plot =
.fit-to-paper = Adatta alla carta
.layout-plots-the-current-sheet-using-the-selec = Layout traccia il foglio corrente utilizzando il formato carta selezionato.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Unisci linee sovrapposte
.object-lineweights = Spessori linea degli oggetti
.orientation = Orientamento
+3
View File
@@ -5002,6 +5002,9 @@ plot =
.fit-to-paper = 用紙にフィット
.layout-plots-the-current-sheet-using-the-selec = 選択した用紙サイズで現在のシートを印刷します。
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = 重複線を結合
.object-lineweights = オブジェクトの線の太さ
.orientation = 方向
+3
View File
@@ -5013,6 +5013,9 @@ plot =
.fit-to-paper = 종이에 맞추기
.layout-plots-the-current-sheet-using-the-selec = 레이아웃은 선택한 용지 크기를 사용하여 현재 시트를 플롯합니다.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = 겹치는 선 병합
.object-lineweights = 객체 선가중치
.orientation = 오리엔테이션
+3
View File
@@ -5012,6 +5012,9 @@ plot =
.fit-to-paper = Aan papier aanpassen
.layout-plots-the-current-sheet-using-the-selec = De lay-out plot het huidige vel op het geselecteerde papierformaat.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Overlaplijnen samenvoegen
.object-lineweights = Objectlijndiktes
.orientation = Oriëntatie
+3
View File
@@ -5013,6 +5013,9 @@ plot =
.fit-to-paper = Dopasuj do papieru
.layout-plots-the-current-sheet-using-the-selec = Układ drukuje bieżący arkusz przy użyciu wybranego rozmiaru papieru.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Połącz nakładające się linie
.object-lineweights = Szerokości linii obiektu
.orientation = Orientacja
+3
View File
@@ -5014,6 +5014,9 @@ plot =
.fit-to-paper = Ajustar ao papel
.layout-plots-the-current-sheet-using-the-selec = Layout plota a folha atual usando o tamanho de papel selecionado.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Mesclar linhas sobrepostas
.object-lineweights = Espessuras de linha dos objetos
.orientation = Orientação
+3
View File
@@ -5015,6 +5015,9 @@ plot =
.fit-to-paper = Вписать в лист
.layout-plots-the-current-sheet-using-the-selec = Лист печатается на выбранном формате бумаги.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Слияние пересекающихся линий
.object-lineweights = Весы для объектов
.orientation = Ориентация
+3
View File
@@ -4954,6 +4954,9 @@ plot =
.fit-to-paper = Kağıda sığdır
.layout-plots-the-current-sheet-using-the-selec = Yerleşim, geçerli sayfayı seçilen kağıt boyutuyla çizer.
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = Çakışan çizgileri birleştir
.object-lineweights = Nesne çizgi kalınlıkları
.orientation = Yönelim
+3
View File
@@ -4997,6 +4997,9 @@ plot =
.fit-to-paper = 布满图纸
.layout-plots-the-current-sheet-using-the-selec = 布局使用所选纸张尺寸打印当前图纸。
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = 合并重叠线
.object-lineweights = 对象线宽
.orientation = 方向
+3
View File
@@ -5009,6 +5009,9 @@ plot =
.fit-to-paper = 布滿圖紙
.layout-plots-the-current-sheet-using-the-selec = 配置使用所選紙張尺寸列印目前圖紙。
.sheet-sizes-and-printable-areas-reported-by-th = Sheet sizes and printable areas reported by the printer.
.custom-paper-size = Custom paper size
.printable-margins = Printable margins
.enter-a-positive-width-and-height = Enter a positive width and height.
.merge-overlapping-lines = 合併重疊線
.object-lineweights = 物件線寬
.orientation = 方向