pdfjs-dist 6.0.227 was released on May 30, 2026. Lector currently declares pdfjs-dist: ^5.5.207 as a peer dependency, which excludes 6.x.
I checked lector's source against the v6 breaking changes and it appears no code changes are needed — only the peer dependency range:
getDocument() no longer accepts bare args — lector already normalizes all sources into DocumentInitParameters via buildDocumentInitParams() in document.ts.
PDFDocumentProxy.destroy() removed — lector already uses loadingTask.destroy() directly.
getXfaPageViewport moved — not used by lector.
- Legacy build path (
pdfjs-dist/legacy/build/pdf.mjs) — still exists in v6.
The fix should be as simple as widening the peer dep to "^5.5.207 || ^6.0.0" (or "^6.0.0" if dropping v5). Happy to open a PR.
pdfjs-dist 6.0.227 was released on May 30, 2026. Lector currently declares
pdfjs-dist: ^5.5.207as a peer dependency, which excludes 6.x.I checked lector's source against the v6 breaking changes and it appears no code changes are needed — only the peer dependency range:
getDocument()no longer accepts bare args — lector already normalizes all sources intoDocumentInitParametersviabuildDocumentInitParams()indocument.ts.PDFDocumentProxy.destroy()removed — lector already usesloadingTask.destroy()directly.getXfaPageViewportmoved — not used by lector.pdfjs-dist/legacy/build/pdf.mjs) — still exists in v6.The fix should be as simple as widening the peer dep to
"^5.5.207 || ^6.0.0"(or"^6.0.0"if dropping v5). Happy to open a PR.