feat: update GitHub Actions workflow for PDF engine and viewer

This commit is contained in:
alam00000
2026-10-19 13:17:07 +05:30
parent 231c012e99
commit 70dc47d25c
16 changed files with 840 additions and 88 deletions
+7 -1
View File
@@ -6,6 +6,7 @@ import { requirePdfInput, processBatch } from '../types';
import { loadPyMuPDF } from '../../utils/pymupdf-loader.js';
import { hexToRgb } from '../../utils/helpers.js';
import { loadPdfDocument } from '../../utils/load-pdf-document.js';
import { redactDocumentData } from '../../utils/redact-document-data.js';
import { wfError } from '../errors';
export class RedactNode extends BaseWorkflowNode {
@@ -106,9 +107,14 @@ export class RedactNode extends BaseWorkflowNode {
}
}
const resultBytes = new Uint8Array(doc.save());
const redactedBytes = new Uint8Array(doc.save());
doc.close();
const resultBytes = await redactDocumentData(
redactedBytes,
mode === 'text' ? searchText : undefined
);
const resultDoc = await loadPdfDocument(resultBytes);
return {