Files
fil/docs/snippets/r/config/ocr_configuration.md

17 lines
325 B
Markdown
Raw Normal View History

2026-06-01 23:40:55 +02:00
```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)
```