- Refactor PDF loading across workflow nodes to use loadPdfDocument utility
- Replaced direct calls to PDFDocument.load with loadPdfDocument in multiple nodes to standardize PDF loading process.
This commit is contained in:
@@ -1,6 +1,22 @@
|
||||
import { PDFDocument } from 'pdf-lib';
|
||||
|
||||
export interface PageDimensionsState {
|
||||
file: File | null;
|
||||
pdfDoc: PDFDocument | null;
|
||||
file: File | null;
|
||||
pdfDoc: PDFDocument | null;
|
||||
}
|
||||
|
||||
export interface AnalyzedPageData {
|
||||
pageNum: number;
|
||||
width: number;
|
||||
height: number;
|
||||
orientation: string;
|
||||
standardSize: string;
|
||||
rotation: number;
|
||||
}
|
||||
|
||||
export interface UniqueSizeEntry {
|
||||
count: number;
|
||||
label: string;
|
||||
width: number;
|
||||
height: number;
|
||||
}
|
||||
|
||||
@@ -1,5 +1,32 @@
|
||||
import { PDFDocument } from 'pdf-lib';
|
||||
|
||||
export interface SignPdfState {
|
||||
file: File | null;
|
||||
pdfBytes: ArrayBuffer | null;
|
||||
signatureData: string | null;
|
||||
file: File | null;
|
||||
pdfBytes: ArrayBuffer | null;
|
||||
signatureData: string | null;
|
||||
}
|
||||
|
||||
export interface PDFViewerEventBus {
|
||||
_on: (event: string, callback: () => void) => void;
|
||||
dispatch: (event: string, data: Record<string, unknown>) => void;
|
||||
}
|
||||
|
||||
export interface PDFViewerApplication {
|
||||
eventBus?: PDFViewerEventBus;
|
||||
pdfDocument?: {
|
||||
saveDocument: (storage: unknown) => Promise<ArrayBuffer>;
|
||||
annotationStorage: unknown;
|
||||
};
|
||||
}
|
||||
|
||||
export interface PDFViewerWindow extends Window {
|
||||
PDFViewerApplication?: PDFViewerApplication;
|
||||
}
|
||||
|
||||
export interface SignState {
|
||||
file: File | null;
|
||||
pdfDoc: PDFDocument | null;
|
||||
viewerIframe: HTMLIFrameElement | null;
|
||||
viewerReady: boolean;
|
||||
blobUrl: string | null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user