mirror of
https://github.com/zadam/trilium.git
synced 2025-11-02 11:26:15 +01:00
added image OCR and parsing text from PDF (and OCR of PDF images)
This commit is contained in:
12
src-build/fix_pdfjs.js
Normal file
12
src-build/fix_pdfjs.js
Normal file
@@ -0,0 +1,12 @@
|
||||
const fs = require("fs");
|
||||
|
||||
const PACKAGE_JSON_PATH = './node_modules/pdfjs-dist/package.json';
|
||||
|
||||
const packageJson = JSON.parse(
|
||||
fs.readFileSync(PACKAGE_JSON_PATH).toString()
|
||||
);
|
||||
|
||||
// non-legacy build doesn't work on node 16 at least
|
||||
packageJson.main = "legacy/build/pdf.js";
|
||||
|
||||
fs.writeFileSync(PACKAGE_JSON_PATH, JSON.stringify(packageJson, null, 2));
|
||||
Reference in New Issue
Block a user