Commit 293f781
feat(doc): improve PDF extraction fallback logic for better text recovery
Reduce dependence on weak text fallbacks for PDF by using intelligent
fallback between lopdf and pdf-extract:
- Try lopdf first for position-aware extraction
- Try pdf-extract as backup comparison
- Use pdf-extract if it has 5x more content (handles embedded fonts)
- Otherwise prefer lopdf for better position info
This reduces dependence on any single extraction method.1 parent 46c174d commit 293f781
1 file changed
Lines changed: 28 additions & 7 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
364 | 364 | | |
365 | 365 | | |
366 | 366 | | |
367 | | - | |
368 | | - | |
369 | | - | |
370 | | - | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
| 381 | + | |
371 | 382 | | |
372 | | - | |
373 | | - | |
374 | | - | |
| 383 | + | |
| 384 | + | |
| 385 | + | |
| 386 | + | |
| 387 | + | |
| 388 | + | |
| 389 | + | |
| 390 | + | |
| 391 | + | |
| 392 | + | |
| 393 | + | |
| 394 | + | |
| 395 | + | |
375 | 396 | | |
376 | 397 | | |
377 | 398 | | |
| |||
0 commit comments