@opendataloader/pdf 2.5.6 → 2.5.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -133,6 +133,7 @@ opendataloader_pdf.convert(
133
133
  | Non-English scanned PDF | Hybrid + OCR | `pip install "opendataloader-pdf[hybrid]"` | `opendataloader-pdf-hybrid --port 5002 --force-ocr --ocr-lang "ko,en"` | `opendataloader-pdf --hybrid docling-fast file1.pdf file2.pdf folder/` |
134
134
  | Mathematical formulas | Hybrid + formula | `pip install "opendataloader-pdf[hybrid]"` | `opendataloader-pdf-hybrid --enrich-formula` | `opendataloader-pdf --hybrid docling-fast --hybrid-mode full file1.pdf file2.pdf folder/` |
135
135
  | Charts needing description | Hybrid + picture | `pip install "opendataloader-pdf[hybrid]"` | `opendataloader-pdf-hybrid --enrich-picture-description` | `opendataloader-pdf --hybrid docling-fast --hybrid-mode full file1.pdf file2.pdf folder/` |
136
+ | Nested sections for RAG chunking | Hybrid + heading levels | `pip install "opendataloader-pdf[hybrid]"` | `opendataloader-pdf-hybrid --port 5002 --heading-hierarchy` | `opendataloader-pdf --hybrid docling-fast file1.pdf file2.pdf folder/` |
136
137
  | Untagged PDFs needing accessibility | Auto-tagging → Tagged PDF | `pip install opendataloader-pdf` | None needed | `opendataloader-pdf --format tagged-pdf file1.pdf file2.pdf folder/` |
137
138
 
138
139
  ## Quick Start
@@ -278,6 +279,36 @@ Output in JSON:
278
279
 
279
280
  > Uses SmolVLM (256M), a lightweight vision model. Custom prompts supported via `--picture-description-prompt`.
280
281
 
282
+ ### Heading Hierarchy
283
+
284
+ The layout model labels a region as a section header without a depth, so by default every
285
+ heading comes back at level 1 and subsections sit at the same depth as the document title.
286
+ Flat headings make it hard to tell a section title from a document title when chunking for RAG.
287
+
288
+ `--heading-hierarchy` infers the depth — from the PDF outline first, then section numbering
289
+ (`1.` → `1.1` → `1.1.1`), then visual style:
290
+
291
+ ```bash
292
+ # Server
293
+ opendataloader-pdf-hybrid --port 5002 --heading-hierarchy
294
+
295
+ # Client — no extra flag needed
296
+ opendataloader-pdf --hybrid docling-fast file1.pdf file2.pdf folder/
297
+ ```
298
+
299
+ ```diff
300
+ # 3. Methodology
301
+ - # 3.1. Multi-Object Rectification Network
302
+ + ## 3.1. Multi-Object Rectification Network
303
+ - # Abstract
304
+ + ## Abstract
305
+ ```
306
+
307
+ Numbering covers numbered sections; style is what pulls an unnumbered `Abstract` or
308
+ `References` out from under the document title.
309
+
310
+ Off by default, so existing output is unchanged. Levels are capped at H6.
311
+
281
312
  ### Hancom Data Loader Integration — Coming Soon
282
313
 
283
314
  Enterprise-grade AI document analysis via [Hancom Data Loader](https://sdk.hancom.com/en/services/1?utm_source=github&utm_medium=readme&utm_campaign=opendataloader-pdf) — customer-customized models trained on your domain-specific documents. 30+ element types (tables, charts, formulas, captions, footnotes, etc.), VLM-based image/chart understanding, complex table extraction (merged cells, nested tables), SLA-backed OCR for scanned documents, and native HWP/HWPX support. Supports PDF, DOCX, XLSX, PPTX, HWP, PNG, JPG. [Live demo](https://livedemo.sdk.hancom.com/en/dataloader?utm_source=github&utm_medium=readme&utm_campaign=opendataloader-pdf)
Binary file
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@opendataloader/pdf",
3
- "version": "2.5.6",
3
+ "version": "2.5.8",
4
4
  "description": "A Node.js wrapper for the opendataloader-pdf Java CLI.",
5
5
  "main": "./dist/index.cjs",
6
6
  "module": "./dist/index.js",
@@ -48,17 +48,17 @@
48
48
  },
49
49
  "devDependencies": {
50
50
  "@eslint/js": "^10.0.1",
51
- "@types/node": "^26.0.0",
52
- "@typescript-eslint/eslint-plugin": "^8.58.2",
53
- "@typescript-eslint/parser": "^8.58.2",
54
- "eslint": "^10.2.0",
51
+ "@types/node": "^26.4.0",
52
+ "@typescript-eslint/eslint-plugin": "^8.68.0",
53
+ "@typescript-eslint/parser": "^8.68.0",
54
+ "eslint": "^10.9.1",
55
55
  "glob": "^13.0.6",
56
- "globals": "^17.5.0",
57
- "prettier": "^3.8.3",
56
+ "globals": "^17.11.0",
57
+ "prettier": "^3.9.6",
58
58
  "tsup": "^8.5.1",
59
- "typescript": "^6.0.2",
60
- "vite": "^8.0.8",
61
- "vitest": "^4.1.4"
59
+ "typescript": "^6.0.3",
60
+ "vite": "^8.2.2",
61
+ "vitest": "^4.1.11"
62
62
  },
63
63
  "files": [
64
64
  "dist",