Skip to content

Update pdfjs-viewer docs for v4.5.0 - #6

Merged
alekswebnet merged 2 commits into
mainfrom
docs/pdfjs-viewer-4.5
Nov 7, 2026
Merged

alekswebnet merged 2 commits into
mainfrom
docs/pdfjs-viewer-4.5

Conversation

@alekswebnet

Copy link
Copy Markdown
Contributor

Summary

Docs for pdfjs-viewer 4.5.0, which is on npm. It adds renderer-src (missing-elements/pdfjs-viewer#77) and narrows the open() type (missing-elements/pdfjs-viewer#79).

  • Version bump to 4.5.0. The page takes its version numbers from the package, so the PDF.js version shown is now 6.5.438. The site's vendor copy now includes pdf.renderer.min.mjs.
  • renderer-src is added to the attribute table and the TypeScript attribute list.
  • Worker section: how to turn on worker rendering with setViewerOptions({ disableWorkerRendering: false }), the CSP it needs, when to set renderer-src, and what happens when the worker can't start.
  • Hosting: the renderer file sits next to the other runtime files. Pipelines with hashed file names need renderer-src when worker rendering is on.
  • Migrating: a note for 4.4.2 and earlier. A pinned worker-src must move to PDF.js 6.5, and TypeScript now rejects a bare Uint8Array in viewerApp.open().

Validation

  • pnpm build passes. The built page shows 6.5.438 seven times and 6.4.299 nowhere.
  • All 57 in-page links point to an existing id.
  • The renderer-src row renders with its default and "Next load".

🤖 Generated with Claude Code

alekswebnet and others added 2 commits November 7, 2026 17:36
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Add renderer-src to the attribute table and the TypeScript attribute list. The Worker section
explains how to turn on PDF.js 6.5's worker rendering, the CSP it needs and its fallback. Hashed
pipelines need renderer-src too. The migration note for 4.5 says a pinned worker-src must move to
PDF.js 6.5, and that TypeScript now rejects a bare Uint8Array in viewerApp.open().

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@socket-security

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​missing-elements/​pdfjs-viewer@​4.4.2 ⏵ 4.5.074 -410092 +292 +170

View full report

@socket-security

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Priority Alert  (click "▶" to expand/collapse) Action
Medium priority
Obfuscated code: npm @missing-elements/pdfjs-viewer is 72.0% likely obfuscated

Confidence: 0.72

Location: Package overview

From: package.json → npm/@missing-elements/pdfjs-viewer@4.5.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@missing-elements/pdfjs-viewer@4.5.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn
Medium priority
Obfuscated code: npm pdfjs-dist is 72.0% likely obfuscated

Confidence: 0.72

Location: Package overview

From: pnpm-lock.yaml → npm/@missing-elements/pdfjs-viewer@4.5.0 → npm/pdfjs-dist@6.5.438

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/pdfjs-dist@6.5.438. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn

View full report

@alekswebnet
alekswebnet merged commit d4cdc19 into main Nov 7, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant