Repository navigation
feat(pdf): release PaddleOCR reader with validated image responses - #148
Conversation
provider: 'paddleocr' returns a complete PDFReader: extractText and performOCR go to the PaddleOCR-VL /layout-parsing service; getInfo, metadata, embedded images and page renders run locally through unpdf. Explicit only (auto never selects it), no retry and no local OCR fallback. PaddleOCRClient gains parseImage() for PNG and JPEG. Closes #145 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Refuse every named OCR engine (tesseract included), convert WebP to PNG before OCR, stop inheriting the reader timeout, throw when the service returns a different page count, and honour enableOCR: false. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
A damaged or encrypted PDF probes as 0 pages locally but may still parse remotely. Also match WebP by canonical format and report an undecodable WebP as EINVAL. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Release PreviewWhen this PR is squash-merged, @happyvertical/pdf will receive a patch version bump based on the PR title's conventional commit format. What happens on merge?
No manual intervention needed. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 34d4abcf71
ℹ️ 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".
Decoded JSON is unchanged; Node 24 and Node 26 emit different compressed bytes. Refs #145
Adds Chad’s PaddleOCR-VL provider from #146 while preserving the original commits. Remote recognition is explicit; metadata, images and rendering remain local. Auto selection is unchanged.
Closes #145
Closes #147
Review fixes enforce one response page per image, reject oversized inputs before local processing, and require complete text coverage across every page before bypassing OCR. Mixed scanned pages, including pages with text footers, remain on the OCR path.
Drive-by fixes
Tracked release-validation item #147:
0914334repairs the broken pnpm pin in package.json;295f2b6repairs the formatter hook for intentionally ignored generated JavaScript;3ee7069regenerates API indexes on CI’s Node 24;8d432eedocuments the Node 24 docs requirement. No hooks or gates were bypassed.Validation and review
Node 24.18.0 and pnpm 11.25.0: frozen install, typecheck, lint, generated API docs check, build, and all 221 tests pass. Regression tests cover malformed image response cardinality, all local size-limit paths, and later scanned pages. Packed public API consumer smoke passed. Live GPU accuracy was not tested.
Independent high-risk full review and targeted follow-up by Claude Opus and Codex Astra: CLEAN at
95f83a39ef8967ea0b3ab2e88fc0ff40caed0b5f, base1918eece3c41bf422ef1f7ee0b38d062912491b9. Original cycle 6216025328, round 6/6, including three contributor-reported prior passes for budget only. No unresolved accepted findings. Evidence: /tmp/paddleocr-release-evidence/pdf/coverage.json.Normal merge queue and on-main Publish workflow release this change. Supersedes #146 after merge.