Run Tesseract OCR over a PDF's page bitmaps — the image-only / scanned
counterpart to readPdf.
When readPdf returns has_text: false, the PDF is image-only;
this function renders each page via @napi-rs/canvas and runs Tesseract
over the bitmap. Tesseract.js + @napi-rs/canvas are optionalDependencies
— without them the function surfaces a clean install-hint error rather
than crashing. Costs ~1-3s/page on a modern laptop at default scale.
Run Tesseract OCR over a PDF's page bitmaps — the image-only / scanned counterpart to readPdf.
When readPdf returns
has_text: false, the PDF is image-only; this function renders each page via@napi-rs/canvasand runs Tesseract over the bitmap. Tesseract.js + @napi-rs/canvas areoptionalDependencies— without them the function surfaces a clean install-hint error rather than crashing. Costs ~1-3s/page on a modern laptop at default scale.