Missed a few changes

This commit is contained in:
Saud Fatayerji
2023-11-16 02:26:45 +03:00
parent 576b0e02f6
commit 373c5e4c26
4 changed files with 14 additions and 18 deletions

View File

@@ -62,22 +62,18 @@ export async function * traverseOperations(operations: Action[], input: PdfFile[
case "impose":
yield* nToN(input, action, async (input) => {
const newPdf = await Operations.impose({file: input, nup: action.values["nup"], format: action.values["format"]});
newPdf.filename += "_imposed";
console.log("newPDF: ", newPdf);
return newPdf;
});
break;
case "merge":
yield* nToOne(input, action, async (inputs) => {
const newPdf = await Operations.mergePDFs({files: inputs});
newPdf.filename = inputs.map(input => input.filename).join("_and_") + "_merged";
return newPdf;
});
break;
case "rotate":
yield* nToN(input, action, async (input) => {
const newPdf = await Operations.rotatePages({file: input, rotation: action.values["rotation"]});
newPdf.filename += "_turned";
return newPdf;
});
break;