This commit is contained in:
16
docs/snippets/r/config/ocr_configuration.md
Normal file
16
docs/snippets/r/config/ocr_configuration.md
Normal file
@@ -0,0 +1,16 @@
|
||||
```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)
|
||||
```
|
||||
Reference in New Issue
Block a user