Detect-Empty-Pages node (PDFJS, OpenCV)

This commit is contained in:
Felix Kaspar
2023-10-24 16:09:10 +02:00
parent 0320d76f05
commit 1588ae4948
6 changed files with 203 additions and 1 deletions

View File

@@ -109,6 +109,12 @@ export async function * traverseOperations(operations, input, Functions) {
input.buffer = await Functions.organizePages(input.buffer, operation.values["operation"], operation.values["customOrderString"]);
});
break;
case "removeBlankPages":
yield* nToN(input, operation, async (input) => {
input.fileName += "_removedBlanks";
input.buffer = await Functions.removeBlankPages(input.buffer, operation.values["whiteThreashold"]);
});
break;
default:
throw new Error(`${operation.type} not implemented yet.`);
break;