This commit is contained in:
32
docs/snippets/dart/config/pdf_config.md
Normal file
32
docs/snippets/dart/config/pdf_config.md
Normal file
@@ -0,0 +1,32 @@
|
||||
```dart title="Dart"
|
||||
import 'package:kreuzberg/kreuzberg.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
final config = ExtractionConfig(
|
||||
useCache: true,
|
||||
enableQualityProcessing: true,
|
||||
forceOcr: false,
|
||||
disableOcr: false,
|
||||
pdfOptions: const PdfConfig(
|
||||
extractImages: true,
|
||||
passwords: <String>['password123'],
|
||||
extractMetadata: true,
|
||||
extractAnnotations: false,
|
||||
allowSingleColumnTables: false,
|
||||
hierarchy: HierarchyConfig(
|
||||
enabled: true,
|
||||
kClusters: 4,
|
||||
includeBbox: false,
|
||||
),
|
||||
),
|
||||
resultFormat: ResultFormat.unified,
|
||||
outputFormat: OutputFormat.plain(),
|
||||
includeDocumentStructure: false,
|
||||
maxArchiveDepth: 3,
|
||||
useLayoutForMarkdown: false,
|
||||
);
|
||||
|
||||
final result = await KreuzbergBridge.extractFile('encrypted.pdf', null, config);
|
||||
print('Title: ${result.metadata.title}');
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user