Skip to content

feat(bericht): the PDF is A4-only, with column widths tuned to hardcoded German headers #404

Open

Description

@DeepDiver1975

From a portability review of main (ecb341b). Small and mechanical; grouped here because both halves live in LageBuch.Documents.

A4 is hardcoded

src/LageBuch.Documents/IncidentReportDocument.cs:56   page.Size(PageSizes.A4);
src/LageBuch.Documents/Sections/AttachmentCaptionSection.cs:32   page.Size(PageSizes.A4);

Margins are 1.5f, Unit.Centimetre. There is no Letter path and no setting. RolesSection.cs sizes its seven columns explicitly against "A4 portrait", so the page size is not purely a container — the column widths are tuned to it.

The section and column headings are hardcoded German arrays

e.g. RolesSection.cs:10 — ["Funktion", "Name", "Abschnitt", "Funkrufname", "Handynummer", "Von", "Bis"], plus "Einsatzdokumentation", "Einsatztagebuch (ETB)", "Kräfteübersicht", "Atemschutzüberwachung", "CO-Messprotokoll", "Angehängte Dateien", "Gesamtstärke: ", and the footer "Seite {n} / {total}". Roughly 42 distinct German literals across the assembly.

The PDF is also where the one de-DE CultureInfo in the codebase surfaces — Formatting.Timestamp (Formatting.cs:9,11, dd.MM.yyyy HH:mm) is shared by the report and the UI.

Why file it separately from #350

#350 is about the mechanism for UI strings. The report has two things the UI does not: column widths that are coupled to the chosen strings and the chosen page size, and an output that leaves the machine and gets filed. Whatever #350 decides, someone still has to re-fit RolesSection's seven columns when the headers change length — that work is specific to this assembly and worth knowing about before the i18n approach is chosen, not after.

Concretely: a paper-size setting (A4/Letter) on IncidentSettings, and the column widths derived from measured header text rather than tuned constants.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or requesti18nLocalization and translatable strings

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions