Skip to content

Support pdfjs-dist 6.x #142

Description

@dbartholomae

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions