Wasm working again for node

needs testing in browser
This commit is contained in:
Felix Kaspar
2023-11-15 00:24:04 +01:00
parent 063acc6bbf
commit 997f0f349d
6 changed files with 903 additions and 21 deletions

View File

@@ -4,10 +4,10 @@ import { ImposeParamsType } from '@stirling-pdf/shared-operations/src/functions/
import { PdfFile } from "@stirling-pdf/shared-operations/src/wrappers/PdfFile";
// Import injected libraries here!
//import * as pdfcpuWrapper from "@stirling-pdf/shared-operations/wasm/pdfcpu/pdfcpu-wrapper-node.js";
import * as pdfcpuWrapper from "@stirling-pdf/shared-operations/src/wasm/pdfcpu/pdfcpu-wrapper-node.js";
async function impose(params: ImposeParamsType): Promise<PdfFile> {
const paramsToUse = { ...params, pdfcpuWrapper: null }; // TODO change null to pdfcpuWrapper
const paramsToUse = { ...params, pdfcpuWrapper: pdfcpuWrapper };
return SharedOperations.impose(paramsToUse);
}