This commit is contained in:
26
docs/snippets/dart/ocr/ocr_paddleocr.md
Normal file
26
docs/snippets/dart/ocr/ocr_paddleocr.md
Normal file
@@ -0,0 +1,26 @@
|
||||
```dart title="Dart"
|
||||
import 'package:kreuzberg/kreuzberg.dart';
|
||||
|
||||
Future<void> main() async {
|
||||
final config = ExtractionConfig(
|
||||
useCache: true,
|
||||
enableQualityProcessing: true,
|
||||
forceOcr: false,
|
||||
disableOcr: false,
|
||||
ocr: const OcrConfig(
|
||||
enabled: true,
|
||||
backend: 'paddleocr',
|
||||
language: 'en',
|
||||
autoRotate: false,
|
||||
),
|
||||
resultFormat: ResultFormat.unified,
|
||||
outputFormat: OutputFormat.plain(),
|
||||
includeDocumentStructure: false,
|
||||
maxArchiveDepth: 3,
|
||||
useLayoutForMarkdown: false,
|
||||
);
|
||||
|
||||
final result = await KreuzbergBridge.extractFile('document.pdf', null, config);
|
||||
print(result.content);
|
||||
}
|
||||
```
|
||||
Reference in New Issue
Block a user