Improve PDF benchmark parsing - #22
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 3705a6e5b9
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if let Some(pages) = pages { | ||
| options = options.pages(pages.iter().copied()); | ||
| } |
There was a problem hiding this comment.
Avoid padding filtered PDF output with unselected pages
When a page filter is passed here, process_pdf_mem_with_options still reports the full document page_count, and extract_ir_with_options then calls fill_missing_pages(..., diagnostics.page_count). For a long PDF, officemd stream file.pdf --pages 1-3 extracts only pages 1-3 but pads the IR back out to every page in the document, so the renderer emits empty ## Page sections for all unselected pages. Keep the requested page set through normalization, or skip full-document padding when a page filter is active.
Useful? React with 👍 / 👎.
Summary
Verification