Files
fil/docs/snippets/r/config/ocr_configuration.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

17 lines
325 B
Markdown

```r
library(kreuzberg)
# Configure OCR with Tesseract
config <- list(
force_ocr = TRUE,
ocr = list(
backend = "tesseract",
language = "eng+deu"
)
)
json <- extract_file_sync("scanned_document.pdf", "application/pdf", config)
result <- jsonlite::fromJSON(json, simplifyVector = FALSE)
cat(result$content)
```