Working (only tested Split yet but im tired)

This commit is contained in:
Felix Kaspar
2023-11-14 23:14:08 +01:00
parent d7feec32dd
commit 85d61fddf0
12 changed files with 164 additions and 136 deletions

View File

@@ -1,6 +1,6 @@
import { PDFDocument } from 'pdf-lib';
import { PdfFile } from '../wrappers/PdfFile';
import { PdfFile, RepresentationType } from '../wrappers/PdfFile';
export type MergeParamsType = {
files: PdfFile[];
@@ -15,5 +15,5 @@ export async function mergePDFs(params: MergeParamsType): Promise<PdfFile> {
copiedPages.forEach((page) => mergedPdf.addPage(page));
}
return new PdfFile("mergedPDF", mergedPdf);
return new PdfFile("mergedPDF", mergedPdf, RepresentationType.PDFLibDocument);
};