This commit is contained in:
13
docs/snippets/r/config/pdf_config.md
Normal file
13
docs/snippets/r/config/pdf_config.md
Normal file
@@ -0,0 +1,13 @@
|
||||
```r title="R"
|
||||
library(kreuzberg)
|
||||
|
||||
config <- list(
|
||||
pdf_options = list(extract_images = TRUE, extract_metadata = TRUE)
|
||||
)
|
||||
|
||||
json <- extract_file_sync("document.pdf", "application/pdf", config)
|
||||
result <- jsonlite::fromJSON(json, simplifyVector = FALSE)
|
||||
|
||||
cat(sprintf("Tables extracted: %d\n", length(result$tables)))
|
||||
cat(sprintf("Content preview: %.50s...\n", result$content))
|
||||
```
|
||||
Reference in New Issue
Block a user