dynamic operation endpoints (cur. impose only)
This commit is contained in:
@@ -58,7 +58,7 @@ export class Impose extends Operator {
|
||||
|
||||
// TODO: This should be ported to SaudF's RecordValidator
|
||||
if(this.actionValues.nup) {
|
||||
if(![2, 3, 4, 8, 9, 12, 16].includes(this.actionValues.nup)) {
|
||||
if(![2, 3, 4, 8, 9, 12, 16].includes(parseInt(this.actionValues.nup))) {
|
||||
return { valid: false, reason: "NUp accepted values are 2, 3, 4, 8, 9, 12, 16 - see: https://pdfcpu.io/generate/nup.html#n-up-value"}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -52,8 +52,8 @@ export async function traverseOperations(operations: Action[], input: PdfFile[],
|
||||
default:
|
||||
const operator = getOperatorByName(action.type);
|
||||
if(operator) {
|
||||
let opteration = new operator(action);
|
||||
input = await opteration.run(input, progressCallback);
|
||||
let operation = new operator(action);
|
||||
input = await operation.run(input, progressCallback);
|
||||
await nextOperation(action.actions, input, progressCallback);
|
||||
}
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user