moving
Some checks failed
Installer Smoke / installer-smoke (push) Has been cancelled

This commit is contained in:
Oleg Maslov
2026-09-02 10:10:29 +02:00
commit 0c3e2ead3b
3841 changed files with 970576 additions and 0 deletions

20
scripts/read-pdf.mjs Normal file
View File

@@ -0,0 +1,20 @@
import fs from 'node:fs';
import { PDFParse } from 'pdf-parse';
const path = process.argv[2];
if (!path) {
console.error('Usage: node read-pdf.mjs <pdf-path>');
process.exit(1);
}
const buf = fs.readFileSync(path);
const parser = new PDFParse({ data: buf });
await parser.load();
const info = await parser.getInfo();
const text = await parser.getText();
console.log('Pages:', info.numPages);
console.log('Title:', info.info?.Title || 'none');
console.log('Author:', info.info?.Author || 'none');
console.log('---CONTENT---');
console.log(text.text);
await parser.destroy();