pdfcpu & wasm update, server side functions init, README.md, CONTRIBUTE.md

This commit is contained in:
Felix Kaspar
2023-10-18 23:56:56 +02:00
parent 21e0385a31
commit c60de02e14
16 changed files with 360 additions and 32 deletions

View File

@@ -1,5 +1,14 @@
import * as pdfcpuWraopper from "../wasm/pdfcpu-wrapper.js";
import * as pdfcpuWraopper from "../wasm/pdfcpu-wrapper-browser.js";
export function impose(snapshot, nup, format) {
return pdfcpuWraopper.impose(snapshot, nup, format);
export async function impose(snapshot, nup, format) {
return await pdfcpuWraopper.oneToOne([
"pdfcpu.wasm",
"nup",
"-c",
"disable",
'f:' + format,
"/output.pdf",
String(nup),
"input.pdf",
], snapshot);
}