diff --git a/.gitignore b/.gitignore index fb7b616c..37e6cd6a 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,5 @@ /node_modules/ -.env \ No newline at end of file +.env +/testFiles/ +/ignore/ +*.code-workspace \ No newline at end of file diff --git a/public/exampleWorkflows.js b/public/exampleWorkflows.js index 1d84885e..f13b9ad8 100644 --- a/public/exampleWorkflows.js +++ b/public/exampleWorkflows.js @@ -122,4 +122,18 @@ export const rotateOnly = { operations: [] } ] +} + +// Split a document up into multiple documents +export const imposeOnly = { + outputOptions: { + zip: false + }, + operations: [ + { + type: "impose", + values: { "nup": 2, "format": "A4L" }, + operations: [] + } + ] } \ No newline at end of file diff --git a/public/functions/impose.js b/public/functions/impose.js new file mode 100644 index 00000000..a2909cc9 --- /dev/null +++ b/public/functions/impose.js @@ -0,0 +1,5 @@ +import * as pdfcpuWraopper from "../wasm/pdfcpu-wrapper.js"; + +export function impose(snapshot, nup, format) { + return pdfcpuWraopper.impose(snapshot, nup, format); +} \ No newline at end of file diff --git a/public/index.html b/public/index.html index 821533bc..f1cf9669 100644 --- a/public/index.html +++ b/public/index.html @@ -5,9 +5,12 @@