This commit is contained in:
21
docs/snippets/php/config/html_output.md
Normal file
21
docs/snippets/php/config/html_output.md
Normal file
@@ -0,0 +1,21 @@
|
||||
```php title="PHP"
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
use Kreuzberg\Kreuzberg;
|
||||
use Kreuzberg\ExtractionConfig;
|
||||
use Kreuzberg\HtmlOutputConfig;
|
||||
|
||||
$config = new ExtractionConfig(
|
||||
resultFormat: 'html',
|
||||
htmlOutput: new HtmlOutputConfig(
|
||||
theme: 'github'
|
||||
)
|
||||
);
|
||||
|
||||
$result = Kreuzberg::extractFileSync('document.pdf', null, $config);
|
||||
|
||||
// Output HTML with kb-* CSS classes
|
||||
echo $result->getContent();
|
||||
?>
|
||||
```
|
||||
Reference in New Issue
Block a user