Changed PdfFile.filename to exclude file extensions. Other naming fixes

This commit is contained in:
Saud Fatayerji
2023-11-16 02:24:10 +03:00
parent 667583984f
commit 576b0e02f6
11 changed files with 108 additions and 83 deletions

View File

@@ -15,5 +15,6 @@ export async function mergePDFs(params: MergeParamsType): Promise<PdfFile> {
copiedPages.forEach((page) => mergedPdf.addPage(page));
}
return new PdfFile("mergedPDF", mergedPdf, RepresentationType.PDFLibDocument);
const newName = "("+params.files.map(input => input.filename).join("_and_") + ")_merged"
return new PdfFile("mergedPDF", mergedPdf, RepresentationType.PDFLibDocument, newName);
};