refactor: replace PDFDocument.load with loadPdfDocument utility in TimestampNode

This commit is contained in:
alam00000 committed 2026-03-27 13:27:58 +05:30
1 parent a90f74c719
commit 86c8086979
2 files changed
+25 -10

No files matched your search

+2 -2
View File
@@ -3,9 +3,9 @@ import { BaseWorkflowNode } from './base-node';
import { pdfSocket } from '../sockets';
import type { SocketData } from '../types';
import { requirePdfInput, processBatch } from '../types';
import { PDFDocument } from 'pdf-lib';
import { TIMESTAMP_TSA_PRESETS } from '../../config/timestamp-tsa.js';
import { timestampPdf } from '../../logic/digital-sign-pdf.js';
import { loadPdfDocument } from '../../utils/load-pdf-document.js';
export class TimestampNode extends BaseWorkflowNode {
readonly category = 'Secure PDF' as const;
@@ -52,7 +52,7 @@ export class TimestampNode extends BaseWorkflowNode {
{ cause: err }
);
}
const document = await PDFDocument.load(bytes);
const document = await loadPdfDocument(bytes);
return {
type: 'pdf',