diff --git a/client/src/app/core/ui-services/pdf-document.service.ts b/client/src/app/core/ui-services/pdf-document.service.ts index 64525dcd7..3799c6d4b 100644 --- a/client/src/app/core/ui-services/pdf-document.service.ts +++ b/client/src/app/core/ui-services/pdf-document.service.ts @@ -165,12 +165,14 @@ export class PdfDocumentService { this.initFonts(); this.imageUrls = imageUrls ? imageUrls : []; pdfMake.vfs = await this.initVfs(); + const pageSize = this.configService.instant('general_export_pdf_pagesize'); + const defaultMargins = pageSize === 'A5' ? [45, 30, 45, 45] : [75, 90, 75, 75]; // needs to be done before, cause the footer is async this.loadFooterImages(); const result = { - pageSize: 'A4', + pageSize: pageSize || 'A4', pageOrientation: landscape ? 'landscape' : 'portrait', - pageMargins: customMargins || [75, 90, 75, 75], + pageMargins: customMargins || defaultMargins, defaultStyle: { font: 'PdfFont', fontSize: this.configService.instant('general_export_pdf_fontsize') diff --git a/openslides/core/config_variables.py b/openslides/core/config_variables.py index c2b3082c9..e69fd4e40 100644 --- a/openslides/core/config_variables.py +++ b/openslides/core/config_variables.py @@ -186,6 +186,20 @@ def get_config_variables(): subgroup="Export", ) + yield ConfigVariable( + name="general_export_pdf_pagesize", + default_value="A4", + input_type="choice", + label="Standard page size in PDF", + choices=( + {"value": "A4", "display_name": "A4"}, + {"value": "A5", "display_name": "A5"}, + ), + weight=147, + group="General", + subgroup="Export", + ) + # Projector yield ConfigVariable(