print file with appendix

This commit is contained in:
Julian Krauser 2025-07-12 16:38:14 +02:00
parent 9ef82adef7
commit 98ce39efc5
7 changed files with 97 additions and 24 deletions

View file

@ -127,7 +127,7 @@ export abstract class PdfExport {
const mergedPdf = await PDFDocument.create();
for (const pdfPath of pdfFilePaths) {
const pdfBytes = FileSystemHelper.readFileasBase64(inputFolder, pdfPath);
const pdfBytes = FileSystemHelper.readFileAsBase64(inputFolder, pdfPath);
const pdf = await PDFDocument.load(pdfBytes);
const copiedPages = await mergedPdf.copyPages(pdf, pdf.getPageIndices());
copiedPages.forEach((page) => mergedPdf.addPage(page));