feat(cli): Add --pages and --select-pages flags, fix CMap matching and whitespace tracking

- Add --pages flag to insert <!-- Page N --> markers between pages
- Add --select-pages flag to process only specific pages (e.g. 1,3,5-10)
- Wire MarkdownOptions and page filter through process_pdf_with_config
- Fix fuzzy CMap matching that caused Cyrillic substitution on Latin text
- Fix whitespace Tj items not advancing text matrix (broke gap detection)
- Tighten single-char fragment join threshold from 0.25 to 0.20
- Gitignore debug/diagnostic binaries and remove tracked ones

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Abimael Martell
2026-02-17 08:58:58 -08:00
co-authored by Claude Opus 4.6
parent 9a98fbc9ec
commit 350bbc0086
12 changed files with 265 additions and 537 deletions
+1
View File
@@ -265,6 +265,7 @@ fn test_markdown_options_custom() {
detect_italic: false,
include_images: false,
include_links: false,
include_page_numbers: false,
};
assert!(!opts.detect_headers);
assert!(opts.detect_lists);