fix(merge): page labels, retain-labels option, and workflow alignment with cpdf

This commit is contained in:
alam00000 committed 2026-05-03 13:28:25 +05:30
1 parent 14557c123c
commit 7e9e8f4afd
33 files changed
+310 -76

No files matched your search

+3 -1
View File
@@ -7,7 +7,8 @@ export interface InterleaveFile {
}
export async function interleavePdfs(
files: InterleaveFile[]
files: InterleaveFile[],
options?: { retainPageLabels?: boolean }
): Promise<Uint8Array> {
if (files.length < 2) {
throw new Error(wfError('alternateMergeNeedsTwo'));
@@ -50,6 +51,7 @@ export async function interleavePdfs(
command: 'interleave',
files,
cpdfUrl: cpdfBaseUrl + 'coherentpdf.browser.min.js',
retainPageLabels: options?.retainPageLabels === true,
},
files.map((f) => f.data)
);