mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-11 17:23:37 +01:00
feat(workflow): add altenate merge tool and translate workflow node and engine errors across locales
This commit is contained in:
1 parent
0040317e48
commit
ef3dab5aeb
74 files changed
+2552
-1077
No files matched your search
@@ -4,6 +4,7 @@ import { pdfSocket } from '../sockets';
|
||||
import type { PDFData, SocketData, MultiPDFData } from '../types';
|
||||
import { loadPyMuPDF } from '../../utils/pymupdf-loader.js';
|
||||
import { loadPdfDocument } from '../../utils/load-pdf-document.js';
|
||||
import { wfError } from '../errors';
|
||||
|
||||
export class XpsToPdfNode extends BaseWorkflowNode {
|
||||
readonly category = 'Input' as const;
|
||||
@@ -47,8 +48,7 @@ export class XpsToPdfNode extends BaseWorkflowNode {
|
||||
async data(
|
||||
_inputs: Record<string, SocketData[]>
|
||||
): Promise<Record<string, SocketData>> {
|
||||
if (this.files.length === 0)
|
||||
throw new Error('No XPS files uploaded in XPS Input node');
|
||||
if (this.files.length === 0) throw new Error(wfError('noXpsUploaded'));
|
||||
|
||||
const pymupdf = await loadPyMuPDF();
|
||||
const results: PDFData[] = [];
|
||||
|
||||
Reference in new issue
Block a user