mirror of
https://github.com/alam00000/bentopdf.git
synced 2026-11-05 20:02:47 +01:00
feat(workflow): add altenate merge tool and translate workflow node and engine errors across locales
This commit is contained in:
@@ -5,6 +5,7 @@ import type { PDFData, SocketData, MultiPDFData } from '../types';
|
||||
import { loadPyMuPDF } from '../../utils/pymupdf-loader.js';
|
||||
import MarkdownIt from 'markdown-it';
|
||||
import { loadPdfDocument } from '../../utils/load-pdf-document.js';
|
||||
import { wfError } from '../errors';
|
||||
|
||||
const md = new MarkdownIt({ html: true, linkify: true, typographer: true });
|
||||
|
||||
@@ -50,8 +51,7 @@ export class MarkdownToPdfNode extends BaseWorkflowNode {
|
||||
async data(
|
||||
_inputs: Record<string, SocketData[]>
|
||||
): Promise<Record<string, SocketData>> {
|
||||
if (this.files.length === 0)
|
||||
throw new Error('No Markdown files uploaded in Markdown Input node');
|
||||
if (this.files.length === 0) throw new Error(wfError('noMarkdownUploaded'));
|
||||
|
||||
const pymupdf = await loadPyMuPDF();
|
||||
const results: PDFData[] = [];
|
||||
|
||||
Reference in New Issue
Block a user