mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-05 22:29:05 +00:00
Волна 2 эпика #674 — у каждого правила один дом, остальные места ссылаются. DECOR-EDITOR.md ← BACKDROP.md + LIVE-TEXT.md: один документ с нумерованными разделами (§3 подложка, §5 текст с живыми значениями), на которые теперь указывают комментарии кода вместо несуществовавших «BACKDROP §2/§3»; исправлено утверждение, что space-card не рисует декор (он рисует подложку и картинки декора, но не фигуры, мебель и текст). LIGHT.md ← матрица настроек света (перевод, тест назван явно: test/devices.test.mjs «issues 84/88»). DEVICE-PRESENTATION.md ← правила «что показывает маркер» из FILTERING.md (порядок cover → light sources → device role, шторы, медиаплееры); «в одном pull request» → «в одном коммите». CANVAS.md: §9.5 «Оптимизировать планы» → CONFIG-COMPATIBILITY.md, overlay и планарные грани Walls → WALL-THICKNESS.md §10–11, таблицы «было/стало» сняты. TESTING-DEMO.md → demo/stand/README.md: карта демо-дома и «чего на стенде нет», ручной чек-лист снят (ручной фазы в процессе нет). ISOMETRIC.md — только текущее; история Stage 2/4 — docs/adr/570-isometric-stage4-visual-handoff.md. SUN.md: удалённый контракт фона снят, правило бумаги — в текущем разделе. UX-MODES.md: декор над заливками, а не «под комнатами»; «hidden isometric»; follow-up из #3 — все выпущены. Шапки VACUUM, WARM-REMOUNT («Выровнять всё по сетке» → «Оптимизировать планы»), WALL-THICKNESS, STYLING-HOOKS, CONFIG-COMPATIBILITY (#33), PDF-EXPORT — без устаревших статусов и планов. README EN/RU: абзац про пересъёмку скриншотов → CONTRIBUTING.md, RADAR и PDF-EXPORT в списке документации, RU догнал EN (2.5D, повторное использование загруженного изображения, STAIRS). Один список канонических документов подсистем в AGENTS.md и промпте ревьюера (_process.yml). WALL-THICKNESS.md ссылается на ADR 282. Правки src/** и validation.py — только пути документов в комментариях. Issue: #679 User-Visible: no Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
87 lines
4.3 KiB
Markdown
87 lines
4.3 KiB
Markdown
# PDF export
|
|
|
|
House Plan can save the current space as a one-page A4 architectural PDF.
|
|
For administrators, the printer button appears in the card header between
|
|
**General settings** and **Help & feedback**. The export is always a flat plan,
|
|
even when the card currently uses the isometric view.
|
|
|
|

|
|
|
|
The PDF always contains the physical architecture: walls, partitions, columns,
|
|
zero-thickness walls and door, window, gate and passage openings. Device
|
|
markers, Home Assistant states, Glow, sunlight, vacuum trails, room colours and
|
|
Zigbee topology are intentionally excluded.
|
|
|
|
The dialog can additionally include:
|
|
|
|
- room dimensions and clean floor areas;
|
|
- room names;
|
|
- furniture and other Background-editor decor;
|
|
- the current space backdrop, when one is configured.
|
|
|
|
The selected options are remembered in this browser. The export reads the
|
|
current plan but never changes it.
|
|
|
|
The dialog is designed to remain usable down to a 320 CSS px-wide View area.
|
|
It does not require horizontal scrolling; on narrow screens its actions stack
|
|
vertically while retaining touch-sized controls.
|
|
|
|
## Sheet and measurement rules
|
|
|
|
The output is a single A4 sheet. House Plan builds the complete print scene
|
|
first — architecture, enabled dimensions, names, decor and backdrop — and then
|
|
chooses portrait or landscape and the smallest standard scale that fits all of
|
|
it. The complete scene is centred on the usable sheet,
|
|
so optional content is not pushed into a fixed reserve or left outside the
|
|
centred area. The footer shows the scale, a 1 m or 5 ft scale bar, a vector
|
|
compass when north is configured, the date and the House Plan version. There
|
|
is no architectural symbol legend.
|
|
|
|
For unusually large plans, House Plan continues the scale series in steps of
|
|
50 until the complete scene fits. If the architecture itself cannot fit on one
|
|
A4 sheet at any scale, export stops with an error instead of producing a
|
|
clipped file.
|
|
|
|
Physical walls, partitions and columns use a `#7f7f7f` base with a consistent
|
|
45-degree hatch. Openings remain clean cut-outs through both the base and the
|
|
hatch. Zero-thickness walls keep the existing dashed print convention and are
|
|
not hatched.
|
|
|
|
Areas use the same clean-floor geometry as the room information card. Internal
|
|
dimensions follow the inner wall faces; external dimensions follow the outer
|
|
physical outline. Only horizontal and vertical measurements are printed;
|
|
genuinely diagonal edges are omitted rather than projected into misleading
|
|
dimensions. Within one room contour or one connected outer ring, equivalent
|
|
opposite measurements are shown once on the side with more free space. Equal
|
|
lengths in different rooms, disconnected rings or unrelated walls are never
|
|
deduplicated globally. Labels are centred on their measured wall and arranged
|
|
in consistent lanes clear of the wall body. Units follow Home Assistant. Very
|
|
short internal edges use a tick instead of unreadable text. A value that has no
|
|
room beside its own wall is not printed at all: it is never pushed through a
|
|
wall, a room name or an area, and it is not moved to a separate list beside the
|
|
plan: a separate list would cost the drawing a whole step of the scale series
|
|
and turn the sheet sideways.
|
|
|
|
For a rectangular step in an exterior facade, the chain retains enough
|
|
horizontal and vertical values to reconstruct the outline: both neighbouring
|
|
facade sections, the step height and one copy of its depth. An extension line
|
|
may leave the physical corner to which it belongs, including a short
|
|
collinear/solid prefix, but it is rejected if it touches architecture again
|
|
after reaching free space. This narrow source-corner rule prevents both lost
|
|
step dimensions and dimension lines drawn through another wall.
|
|
|
|
## Images, fonts and limits
|
|
|
|
Backdrop and decor images are embedded locally in the browser. They are not
|
|
sent to a conversion service. Embedded image data is limited to 25 MB; an
|
|
unavailable image or exceeded limit stops the export and leaves the dialog open
|
|
so the options can be changed.
|
|
|
|
Text uses an embedded subset of Roboto Regular covering the four House Plan
|
|
interface languages. The bundled font is distributed under the Apache License
|
|
2.0; its license is stored in `assets/fonts/LICENSE`.
|
|
|
|
The resulting file is named
|
|
`houseplan-<space-name>-<YYYY-MM-DD>.pdf`. Browser and Home Assistant mobile-app
|
|
download handling determines its final Downloads location.
|