This commit is contained in:
14
docs/snippets/rust/config/html_output.md
Normal file
14
docs/snippets/rust/config/html_output.md
Normal file
@@ -0,0 +1,14 @@
|
||||
```rust title="Rust"
|
||||
use kreuzberg::{extract_file_sync, ExtractionConfig, HtmlOutputConfig, HtmlTheme, OutputFormat};
|
||||
|
||||
let config = ExtractionConfig {
|
||||
output_format: OutputFormat::Html,
|
||||
html_output: Some(HtmlOutputConfig {
|
||||
theme: HtmlTheme::GitHub,
|
||||
..Default::default()
|
||||
}),
|
||||
..Default::default()
|
||||
};
|
||||
let result = extract_file_sync("document.pdf", None, &config).unwrap();
|
||||
println!("{}", result.content); // HTML with kb-* classes
|
||||
```
|
||||
Reference in New Issue
Block a user