diff --git a/js/import/import.js b/js/import/import.js index 0868bdf..696015f 100644 --- a/js/import/import.js +++ b/js/import/import.js @@ -442,8 +442,10 @@ export async function importFiles(files, options = {}) { opt.enableOpt = await runFontOptimization(ocrAll.active); } }); - } else if (extractPDFTextNative || extractPDFTextOCR) { - await extractInternalPDFText({ setActive: true, extractPDFTextNative, extractPDFTextOCR, extractPDFTextImage }); + } else if (inputData.pdfMode && (extractPDFTextNative || extractPDFTextOCR)) { + await extractInternalPDFText({ + setActive: true, extractPDFTextNative, extractPDFTextOCR, extractPDFTextImage, + }); } }