|
1 | 1 | { |
| 2 | + // A "parsers" list loads ONLY the parsers it names; the "default-parser" entry at |
| 3 | + // the bottom keeps all the others. Windows paths in JSON need forward slashes or |
| 4 | + // escaped backslashes. |
2 | 5 | "parsers": [ |
3 | 6 | { |
4 | 7 | "pdf-parser": { |
| 8 | + // Enforce the PDF's access permissions. DONT_CHECK ignores them. |
5 | 9 | // Options: DONT_CHECK, ALLOW_EXTRACTION_FOR_ACCESSIBILITY, IGNORE_ACCESSIBILITY_ALLOWANCE |
6 | 10 | "accessCheckMode": "DONT_CHECK", |
| 11 | + // Character-width tolerance for inserting spaces (PDFBox). |
7 | 12 | "averageCharTolerance": 0.3, |
| 13 | + // Collect per-stream IOExceptions in metadata and rethrow after parsing. |
8 | 14 | "catchIntermediateIOExceptions": true, |
| 15 | + // Detect and correct rotated (angled) text runs within a page. |
9 | 16 | "detectAngles": false, |
| 17 | + // Line-height multiple that starts a new paragraph (PDFBox). |
10 | 18 | "dropThreshold": 2.5, |
| 19 | + // Estimate where spaces belong between words (most PDFs lack explicit spaces). |
11 | 20 | "enableAutoSpace": true, |
| 21 | + // Extract AcroForm field content. |
12 | 22 | "extractAcroFormContent": true, |
| 23 | + // Extract PDF actions; JavaScript macros become embedded documents. |
13 | 24 | "extractActions": false, |
| 25 | + // Extract annotation text (comments, form-field captions). |
14 | 26 | "extractAnnotationText": true, |
| 27 | + // Extract outline / bookmark text. |
15 | 28 | "extractBookmarksText": true, |
| 29 | + // Record font names in metadata. |
16 | 30 | "extractFontNames": false, |
| 31 | + // Record metadata about incremental updates (whether present, how many). |
17 | 32 | "extractIncrementalUpdateInfo": true, |
| 33 | + // Record inline-image metadata only, without rendering (faster than extractInlineImages). |
18 | 34 | "extractInlineImageMetadataOnly": false, |
| 35 | + // Render and extract inline images from content streams. |
19 | 36 | "extractInlineImages": false, |
| 37 | + // Extract marked-content / structure tags, falling back to plain text. |
20 | 38 | "extractMarkedContent": false, |
| 39 | + // Emit each unique inline image (by object id) only once. |
21 | 40 | "extractUniqueInlineImagesOnly": true, |
| 41 | + // If the PDF has an XFA form, process only it. |
22 | 42 | "ifXFAExtractOnlyXFA": false, |
| 43 | + // Ignore content-stream space glyphs; rely on the spacing algorithm (PDFBOX-3774). |
23 | 44 | "ignoreContentStreamSpaceGlyphs": false, |
| 45 | + // EXPERT: replace the inline-image factory; give a class implementing |
| 46 | + // ImageGraphicsEngineFactory, e.g.: |
| 47 | + // "imageGraphicsEngineFactoryClass": "com.example.MyImageGraphicsEngineFactory" |
| 48 | + // How to render page images; NONE renders nothing. |
24 | 49 | // Options: NONE, RAW_IMAGES, RENDER_PAGES_BEFORE_PARSE, RENDER_PAGES_AT_PAGE_END |
25 | 50 | "imageStrategy": "NONE", |
| 51 | + // Max incremental updates to parse when parseIncrementalUpdates is true. |
26 | 52 | "maxIncrementalUpdates": 10, |
| 53 | + // Max memory to load a PDF before buffering to a temp file (default 512MB). |
27 | 54 | "maxMainMemoryBytes": 536870912, |
| 55 | + // Max pages to process; -1 = no limit. |
28 | 56 | "maxPages": -1, |
| 57 | + // OCR settings. Requires an OCR engine (e.g. Tesseract) installed. |
29 | 58 | "ocr": { |
| 59 | + // Render resolution (dpi) for OCR. |
30 | 60 | "dpi": 300, |
| 61 | + // Image format sent to the OCR engine. |
31 | 62 | // Options: PNG, TIFF, JPEG |
32 | 63 | "imageFormat": "PNG", |
| 64 | + // Image quality (0.0-1.0) for lossy formats. |
33 | 65 | "imageQuality": 1.0, |
| 66 | + // Rendered-image color model. |
34 | 67 | // Options: RGB, GRAY |
35 | 68 | "imageType": "GRAY", |
| 69 | + // Skip OCR for rendered pages larger than this area (w x h); -1 = no limit. |
| 70 | + "maxImagePixels": 100000000, |
| 71 | + // Max pages to OCR per document; -1 = no limit. |
| 72 | + "maxPagesToOcr": -1, |
| 73 | + // Which page content to render for OCR. |
36 | 74 | // Options: NO_TEXT, TEXT_ONLY, VECTOR_GRAPHICS_ONLY, ALL |
37 | 75 | "renderingStrategy": "ALL", |
| 76 | + // When to run OCR; AUTO runs it only on text-poor pages. |
38 | 77 | // Options: AUTO, NO_OCR, OCR_ONLY, OCR_AND_TEXT_EXTRACTION |
39 | 78 | "strategy": "AUTO", |
| 79 | + // Per-page character thresholds that trigger AUTO OCR. |
40 | 80 | "strategyAuto": { |
41 | 81 | "totalCharsPerPage": 10, |
42 | 82 | "unmappedUnicodeCharsPerPage": 10 |
43 | 83 | } |
44 | 84 | }, |
| 85 | + // Parse prior incremental-update versions as embedded documents. |
45 | 86 | "parseIncrementalUpdates": false, |
| 87 | + // EXPERT: set the Sun KCMS color-management system property. Default false. |
46 | 88 | "setKCMS": false, |
| 89 | + // Sort text by x/y position; helps some PDFs, can interleave columns in others. |
47 | 90 | "sortByPosition": false, |
| 91 | + // Space-width tolerance for inserting spaces (PDFBox). |
48 | 92 | "spacingTolerance": 0.5, |
| 93 | + // Remove text drawn twice over the same region (faked bold); can be slow. |
49 | 94 | "suppressDuplicateOverlappingText": false, |
| 95 | + // Throw on an encrypted payload instead of skipping it. |
50 | 96 | "throwOnEncryptedPayload": false |
51 | 97 | } |
| 98 | + }, |
| 99 | + { |
| 100 | + // Keep Tika's other default parsers. Without this, this config is PDF-only. |
| 101 | + "default-parser": {} |
52 | 102 | } |
53 | 103 | ] |
54 | 104 | } |
0 commit comments