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

Technical Evaluation

  • Architecture fit: Poor for a Laravel codebase. salva/pdfjs-bundle is a Symfony2 bundle, not a Laravel package. It assumes Symfony DI container, bundle registration, Twig/templating conventions, and Symfony asset handling. Requiring it via Composer would not expose Laravel service providers, facades, config publishing, Blade directives, or route/view integration.
  • Integration feasibility: Low as a package dependency; medium as a reference implementation. The underlying value is Mozilla pdf.js front-end integration, which can be replicated in Laravel through static assets, npm/Vite, and Blade views. The Symfony wrapper itself adds little reusable PHP value.
  • Technical risk: High. The package targets Symfony2-era PHP, has 3 stars, 0 dependents, and likely ships an old pdf.js version. Risk areas include outdated PDF rendering/security behavior, incompatible Symfony APIs, missing PHP 8 compatibility, obsolete front-end APIs, no active maintenance, and unclear worker/CSP configuration.
  • Key questions:
    • Is the requirement simply to render PDFs in a Laravel app, or to preserve Symfony-specific bundle behavior?
    • Which pdf.js version and browser/security requirements are acceptable?
    • Are there licensing, CSP, CORS, authentication, or document-confidentiality constraints?
    • Can the team own a small custom Blade + Vite integration instead of adopting the bundle?
    • Is there any reason to retain Symfony2 compatibility in a Laravel/PHP stack?

Integration Approach

  • Stack fit: Weak. Laravel should not depend on a Symfony2 bundle. A better fit is a direct pdf.js integration using npm/Vite, a Blade component, and Laravel routes/controllers for authorized PDF delivery.
  • Migration path: Do not install the bundle as production infrastructure. Treat it as a reference for asset layout and viewer initialization. Extract the minimal pdf.js viewer pattern, then rebuild it natively in Laravel with maintained pdf.js assets.
  • Compatibility: Assume incompatibility with modern Laravel/PHP versions until proven otherwise. Validate PHP constraints, Symfony version constraints, Twig assumptions, asset publishing, and the bundled pdf.js version before any spike. Expect the Composer package to be installable but functionally unused in Laravel.
  • Sequencing:
    1. Confirm the actual product need: inline PDF viewing, annotation, search, print, or protected document delivery.
    2. Inventory whether an existing Laravel front-end build pipeline can host pdf.js.
    3. Prototype a Blade view plus Vite/npm pdf.js viewer with a Laravel-authenticated PDF endpoint.
    4. Review CSP, worker loading, CORS, caching, and mobile behavior.
    5. Only use the bundle as a code reference; otherwise replace it with a maintained pdf.js distribution and document the custom integration.

Operational Impact

  • Maintenance: High relative to value. The package is effectively unmaintained for modern Laravel, and the team would own any patched assets, compatibility shims, and security updates. A direct pdf.js integration is simpler to maintain because upgrades are explicit and front-end tooling is standard.
  • Support: Very limited. With 3 stars and 0 dependents, there is minimal community support, no visible Laravel ecosystem adoption, and little assurance of issue triage or Symfony2 compatibility fixes.
  • Scaling: The PHP bundle does not materially help scale. PDF rendering happens client-side in pdf.js; operational scaling depends on static asset delivery, CDN caching, document storage, auth checks, and worker configuration. Those should be designed in Laravel rather than inherited from the bundle.
  • Failure modes: Likely failure points include Composer autoload/bundle registration outside Symfony, missing Twig services, stale pdf.js worker paths, CSP blocking workers or blob URLs, CORS failures for PDF fetches, asset publishing mismatch, authentication bypass in document endpoints, and browser incompatibility due to old viewer APIs.
  • Ramp-up: Low for developers familiar with pdf.js and Laravel front-end tooling; misleading for teams expecting a drop-in Laravel package. Estimate a small spike to reproduce the viewer in Blade/Vite, plus security and auth review. The Symfony bundle itself should not be part of the ramp-up plan.
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.
payerurl/telegrambot-crypto-payment-instant-payout
dskripchenko/laravel-hybrid-search
riorizkyrainey/lara-ced
mehedimi/static-vel
zharp/zharp
nonsapiens/bigquery-model-sync
lgu-bayambang-ict-office/lgu-laravel-development-standards
andydefer/laravel-support
se7enxweb/flysystem
lampwick/laravel
jeslage/statamic-emojis
micahdshackelford/rmap-laravel
draftsmaninc/draftsman
square-bit/laravel-volition
himito/laravel-mailman
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk