PDF Export von A4 auf A3 damit der Text mehr Platz hat

This commit is contained in:
Erik committed 2026-08-13 08:07:54 +02:00
1 parent cddce52d3d
commit eb71a9160f
2 files changed
+13 -12

No files matched your search

+13 -12
View File
@@ -2240,12 +2240,12 @@ const PDF_ASSIGN_MAIN = '#248A3D';
const PDF_ASSIGN_OPT = '#D18B00';
// --- Seitengeometrie (A4 quer, in pt) ---
const PDF_PAGE_W = 841.89;
const PDF_MARGIN_X = 20; // war 25
const PDF_PAD_X = 2; // war 3 -> 4pt statt 6pt je Spalte
// --- Seitengeometrie (A3 quer, in pt) ---
const PDF_PAGE_W = 1190.55; // A3 quer, vorher A4: 841.89
const PDF_MARGIN_X = 20;
const PDF_PAD_X = 2;
const PDF_LINE_W = 0.8;
const PDF_USABLE_W = PDF_PAGE_W - PDF_MARGIN_X * 2; // 801,89
const PDF_USABLE_W = PDF_PAGE_W - PDF_MARGIN_X * 2; // 1150,55
const PDF_STYLES = {
@@ -2544,8 +2544,8 @@ function pdfColumnWidths(allPeople){
}
// Bezeichnung erhält 60 %, Status 40 %
const wName = Math.floor(textSpace * 0.60);
const wStatus = Math.floor(textSpace * 0.40);
const wName = Math.floor(textSpace * 0.40);
const wStatus = Math.floor(textSpace * 0.60);
return [wNr, wName, wStatus]
.concat(new Array(nPeople).fill(wPerson))
@@ -2621,7 +2621,7 @@ function pdfLoadSection(w, grouped){
if(l > maxLoad) maxLoad = l;
});
const BAR_W = 90;
const BAR_W = 140;
const body = [[
{ text: 'Rolle', style: 'th' },
{ text: 'Kürzel', style: 'th' },
@@ -2713,7 +2713,7 @@ async function exportPDF(){
fontSize: 8, color: '#6E6E73', alignment: 'center',
margin: [0, 30, 0, 0] });
const content = [{ stack: cover, margin: [0, 110, 0, 0], pageBreak: 'after' }];
const content = [{ stack: cover, margin: [0, 170, 0, 0], pageBreak: 'after' }];
// --- Projektgruppen ---
const groups = {};
@@ -2739,18 +2739,19 @@ async function exportPDF(){
content.push({
table: { headerRows: 3, widths: widths, body: body, dontBreakRows: true },
layout: pdfTableLayout(),
margin: [0, 0, 0, 14]
margin: [0, 0, 0, 14],
pageBreak: 'after'
});
});
// --- Anwesenheit / Auslastung ---
content.push({ text: '', pageBreak: 'before' });
//content.push({ text: '', pageBreak: 'before' });
pdfAttendanceBlock(w).forEach(b => content.push(b));
content.push({ text: '', margin: [0, 14, 0, 0] });
pdfLoadSection(w, grouped).forEach(b => content.push(b));
const doc = {
pageSize: 'A4',
pageSize: 'A3',
pageOrientation: 'landscape',
pageMargins: [PDF_MARGIN_X, 25, PDF_MARGIN_X, 30],
defaultStyle: { font: 'Roboto', fontSize: 7, color: '#1D1D1F' },