Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Pdfjs Bundle Laravel Package

salva/pdfjs-bundle

Salva PDF.js Bundle integrates Mozilla PDF.js into Symfony applications, providing Twig helpers, configurable viewer assets, and a simple way to embed browser-based PDF rendering without plugins or external services. Ideal for displaying PDF documents inline.

View on GitHub
Deep Wiki
Context7

Product Decisions This Supports

  • Feature scoping — in-browser document viewing. If a roadmap item reads “let users preview contracts, invoices, statements, or reports without downloading,” this package is one implementation of that capability. It is a thin Symfony2 wrapper that ships Mozilla PDF.js assets and a viewer template, so the real capability is PDF.js, not the bundle.
  • Build vs. buy — and the answer here is usually “assemble.” The bundle saves roughly the time it takes to add a <script> tag, a viewer container, and a worker path. That is typically under a developer-day. Treat it as a reference implementation to copy, not a dependency to adopt.
  • Commodity vs. differentiator. Client-side PDF rendering is a commodity. It should never anchor a roadmap or a competitive narrative; it should be the cheapest thing that clears the usability bar. This framing keeps the team from over-investing in a viewer.
  • Legacy-modernization trigger. Finding this in a dependency tree is a signal that the application is on Symfony 2.x, which has been end-of-life since 2019 and receives no security patches. That is a far larger product risk than the PDF viewer itself, and it belongs on the platform roadmap.
  • Use cases served: admin/back-office document review, invoice and receipt preview, compliance-packet reading, pre-signature review, course-material and report delivery. All of these are “view a PDF in the browser,” none require the bundle specifically.
  • Laravel mismatch. This is a Symfony bundle, not a Laravel package. On a Laravel codebase it cannot be installed as-is; only its templates and asset wiring are reusable as copy-paste. Any decision to “just add it” on Laravel is a misunderstanding of the ecosystem and should be corrected before estimation.

When to Consider This Package

Consider it only when all of the following hold:

  • The application is genuinely on Symfony 2.x (or old enough to have no front-end build pipeline), and you need a PDF viewer this sprint.
  • You are avoiding npm/Vite/Encore tooling entirely and want prebuilt vendor assets committed to the repo.
  • The app is internal or low-exposure, and you accept carrying an unmaintained dependency.
  • You have independently reviewed the bundled PDF.js version for known CVEs, because the bundle will not track them for you.

Look elsewhere when:

  • You are on Laravel. Wrong framework; use pdfjs-dist directly or a maintained Laravel wrapper, and skip the bundle semantics.
  • You are on Symfony 4/5/6/7. The package’s Symfony2 constraints will block installation, and modern Symfony expects AssetMapper, Webpack Encore, or Vite for this.
  • You need a maintained supply chain. Three stars and zero dependents means no community review, no release cadence, no CVE response. PDF.js has had real security issues; an unpinned, stale vendored copy is a liability.
  • You need more than viewing. Annotations, form filling, e-signatures, text extraction, redaction, or server-side rendering/thumbnailing are out of scope — those need a purpose-built library or a commercial SDK.
  • You must meet accessibility (WCAG/PDF-UA), mobile, or very large-document performance requirements. You will be tuning PDF.js yourself regardless, so own the integration.
  • You want a vendor-supported path. Commercial embedded viewers buy you support, accessibility conformance, and signature workflows.

How to Pitch It (Stakeholders)

For executives: This is not a strategic dependency. It is a small, three-star convenience wrapper around free Mozilla technology, last meaningfully relevant for a framework that stopped receiving security updates in 2019. Adopting it as a dependency would add supply-chain risk to save well under a developer-day of work. Recommendation: do not add it to the dependency manifest. If we need in-browser PDF viewing, we vendor PDF.js ourselves with a pinned version and a documented upgrade path. Treat the package’s presence in any repository as a prompt to revisit our framework modernization plan.

For engineering: The bundle contributes asset registration and a viewer template; everything that matters is upstream PDF.js. Port the wiring — viewer container, worker source path, and asset registration — into our existing build (Vite/AssetMapper on modern Symfony, or pdfjs-dist on Laravel), pin the PDF.js version explicitly, and record it in our dependency-review list so security advisories are tracked. Do not inherit its Symfony2 constraints. If we discover it in a legacy app, leave it in place short-term if the effort to remove it exceeds the risk, but log it as tech debt tied to the framework upgrade, and confirm the bundled PDF.js version against known advisories before we ship anything that opens untrusted documents.

Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
adachsoft/api-version-bundle