Stirling-PDF/server-node/src/utils/pdf-operations.ts

17 lines
633 B
TypeScript
Raw Normal View History

import SharedOperations, { OperatorsType, OperatorParametersType } from "@stirling-pdf/shared-operations/src"
2023-11-15 02:27:21 +03:00
import { PdfFile } from "@stirling-pdf/shared-operations/src/wrappers/PdfFile"
// Import injected libraries here!
import * as pdfcpuWrapper from "@stirling-pdf/shared-operations/src/wasm/pdfcpu/pdfcpu-wrapper-node.js";
async function impose(params: OperatorParametersType["Impose"]): Promise<PdfFile> {
return SharedOperations.Impose.exec(params, pdfcpuWrapper);
}
const toExport: OperatorsType = {
...SharedOperations,
Impose: {exec: impose, spec: SharedOperations.Impose.spec},
}
export default toExport;