2023-11-14 03:26:42 +03:00
|
|
|
export type ImposeParamsType = {
|
|
|
|
file: any;
|
|
|
|
nup: number;
|
|
|
|
format: string;
|
|
|
|
}
|
|
|
|
export type ImposeParamsBaseType = {
|
|
|
|
file: any;
|
|
|
|
nup: number;
|
|
|
|
format: string;
|
|
|
|
pdfcpuWrapper: any;
|
|
|
|
}
|
|
|
|
export async function impose(params: ImposeParamsBaseType) {
|
|
|
|
return await params.pdfcpuWrapper.oneToOne([
|
2023-10-18 23:56:56 +02:00
|
|
|
"pdfcpu.wasm",
|
|
|
|
"nup",
|
|
|
|
"-c",
|
|
|
|
"disable",
|
2023-11-14 03:26:42 +03:00
|
|
|
'f:' + params.format,
|
2023-10-18 23:56:56 +02:00
|
|
|
"/output.pdf",
|
2023-11-14 03:26:42 +03:00
|
|
|
String(params.nup),
|
2023-10-18 23:56:56 +02:00
|
|
|
"input.pdf",
|
2023-11-14 03:26:42 +03:00
|
|
|
], params.file);
|
2023-10-18 01:20:31 +02:00
|
|
|
}
|