This commit is contained in:
15
docs/snippets/r/getting-started/basic_usage.md
Normal file
15
docs/snippets/r/getting-started/basic_usage.md
Normal file
@@ -0,0 +1,15 @@
|
||||
```r title="R"
|
||||
library(kreuzberg)
|
||||
|
||||
config <- ExtractionConfig$default()
|
||||
|
||||
json <- extract_file_sync(
|
||||
path = "document.pdf",
|
||||
mime_type = NULL,
|
||||
config = config
|
||||
)
|
||||
result <- jsonlite::fromJSON(json, simplifyVector = FALSE)
|
||||
|
||||
cat(result$content)
|
||||
cat(sprintf("\nMIME Type: %s\n", result$mime_type))
|
||||
```
|
||||
Reference in New Issue
Block a user