From aa15c19045372462b7598f9bb47cdb3906898113 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Mon, 11 May 2026 16:32:08 +0200 Subject: [PATCH 1/2] Improve table of content in agenda export pdf. - increase column width of identifier - move identifier of subitems in text column --- .../pdf-document.service/pdf-document.service.ts | 16 +++++++++++++--- .../agenda-pdf-catalog-export.service.ts | 8 ++------ 2 files changed, 15 insertions(+), 9 deletions(-) diff --git a/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts b/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts index f993498607..d3d52accf8 100644 --- a/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts +++ b/client/src/app/gateways/export/pdf-document.service/pdf-document.service.ts @@ -74,6 +74,7 @@ export interface TocLineDefinition { identifier: string; title: string; pageReference: string; + level?: number; style?: StyleType; fillColor?: string; } @@ -481,17 +482,26 @@ export class PdfDocumentService { * @returns A line for the toc */ public createTocLine( - { identifier, title, pageReference, fillColor = `` }: TocLineDefinition, + { identifier, title, pageReference, level = 0, fillColor = `` }: TocLineDefinition, ...subTitle: Content[] ): Content[] { + const isSubItem = level > 0; return [ { - text: identifier, + text: isSubItem ? `` : identifier, + noWrap: true, style: `tocEntry`, fillColor }, { - text: [title, ...subTitle], + text: isSubItem + ? [ + { text: identifier ? `${identifier} ยท ` : ``}, + title, + ...subTitle + ] + : [title, ...subTitle], + margin: isSubItem ? [0, 0, 0, 0] : undefined, style: `tocEntry`, fillColor }, diff --git a/client/src/app/site/pages/meetings/pages/agenda/services/agenda-pdf-catalog-export.service/agenda-pdf-catalog-export.service.ts b/client/src/app/site/pages/meetings/pages/agenda/services/agenda-pdf-catalog-export.service/agenda-pdf-catalog-export.service.ts index f3a19a9d7c..881c488ed5 100644 --- a/client/src/app/site/pages/meetings/pages/agenda/services/agenda-pdf-catalog-export.service/agenda-pdf-catalog-export.service.ts +++ b/client/src/app/site/pages/meetings/pages/agenda/services/agenda-pdf-catalog-export.service/agenda-pdf-catalog-export.service.ts @@ -131,11 +131,6 @@ export class AgendaPdfCatalogExportService { // Initialize the header and the layout for border-style. const header = this.getTocHeaderDefinition(); const layout = BorderType.LIGHT_HORIZONTAL_LINES; - // Create the toc title - const tocTitle = { - text: this.translate.instant(`Table of contents`), - style: `heading2` - }; // all agenda in the same table const tocBody = []; @@ -147,6 +142,7 @@ export class AgendaPdfCatalogExportService { identifier: `${topic.item_number ? topic.item_number : ``}`, title: topic.content_object?.title, pageReference: `${topic.id}`, + level: topic.level, style: StyleType.DEFAULT, fillColor: (i + 1) % 2 ? TABLEROW_GREY : undefined }) @@ -161,7 +157,7 @@ export class AgendaPdfCatalogExportService { ) ); - return [tocTitle, toc, this.pdfService.getPageBreak()]; + return [toc, this.pdfService.getPageBreak()]; } /** From 69342053f25d1b2ab99b1491ddf5e3c650f65f1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emanuel=20Sch=C3=BCtze?= Date: Wed, 13 May 2026 15:05:58 +0200 Subject: [PATCH 2/2] Optimize colmun width in poll pdf. Use full name. --- .../modules/poll/base/base-poll-pdf.service.ts | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts index f7fb6063b5..dd5984cbb2 100644 --- a/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts +++ b/client/src/app/site/pages/meetings/modules/poll/base/base-poll-pdf.service.ts @@ -598,7 +598,8 @@ export abstract class BasePollPdfService { )) { const tableLine = [ { - text: index + text: index, + noWrap: true }, { text: this.getUserNameForExport(date.user) @@ -668,7 +669,8 @@ export abstract class BasePollPdfService { } const tableLine = [ { - text: index + text: index, + noWrap: true }, { text: name + represented @@ -693,7 +695,7 @@ export abstract class BasePollPdfService { return [ { table: { - widths: showVoteWeight ? [`4%`, `32%`, `32%`, `32%`] : [`4%`, `48%`, `48%`], + widths: showVoteWeight ? [`4%`, `48%`, `24%`, `24%`] : [`4%`, `72%`, `24%`], headerRows: 1, body: pollTableBody }, @@ -703,7 +705,7 @@ export abstract class BasePollPdfService { } private getUserNameForExport(user: ViewUser | undefined): string { - return user?.getShortName() ?? this.translate.instant(`Anonymous`); + return user?.getFullName() ?? this.translate.instant(`Anonymous`); } private getUserVoteWeightForExport(user: ViewUser | undefined): string {