Files
fil/docs/snippets/kotlin/config/html_output.md
Henrik Jess Nielsen b4c07d3693
All checks were successful
Deploy fil (kreuzberg) / deploy (push) Successful in 49s
Nomad changes
2026-06-01 23:40:55 +02:00

20 lines
520 B
Markdown

```kotlin title="Kotlin"
import dev.kreuzberg.*
import java.nio.file.Paths
import java.util.Optional
fun main() {
val htmlOutput = HtmlOutputConfig.builder()
.withTheme(HtmlTheme.GitHub)
.build()
val config = ExtractionConfig.builder()
.withOutputFormat(OutputFormat.Html)
.withHtmlOutput(Optional.of(htmlOutput))
.build()
val result = Kreuzberg.extractFileSync(Paths.get("document.pdf"), null, config)
println(result.content()) // HTML with kb-* classes
}
```