Weave Code
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

Pdf Viewer Bundle Laravel Package

anglemx/pdf-viewer-bundle

View on GitHub
Deep Wiki
Context7

Angle PDF Viewer Bundle

PDF in-browser viewer using the PDF.js library to render documents with HTML5.

Current build using PDF.js release v4.0.379.

Installation

Install composer dependency:

composer require anglemx/pdf-viewer-bundle

Make sure that the Bundle has been enabled and auto-wired in the bundles.php file.

// config/bundles.php

return [
    // ...
    Angle\PDFViewerBundle\AnglePDFViewerBundle::class => ['all' => true],
    // ...
];

Configure routing

As per the official Symfony documentation:

Routing is never automatically imported in Symfony.

This means that your application will need to explicitly import the routes to enable the bundle's controller.

angle_pdf_viewer:
  resource: "@AnglePDFViewerBundle/Resources/config/routes.yaml"

Usage

return $this->redirectToRoute('angle_pdf_viewer_view', ['file' => '/path/to/file']);
<a href="{{ path('angle_pdf_viewer_view', {'file': '/path/to/file'}) }}">View PDF</a>

Quick Test

Try to access the following URL after installing:

/_pdf?file=/bundles/anglepdfviewer/vendor/pdfjs/web/compressed.tracemonkey-pldi-09.pdf
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.
terminal42/code-quality-tools
codifyo/ts-generator-bundle
andydefer/laravel-cluster
testo/fiber
mintobit/jobqueue
a4sex/maintenance-bundle
a4sex/entity-date-update
a4sex/client-identifier
a4sex/base-utilites
a4sex/key-value-storage
a4sex/micro-status
chilldev/dependency-injection-extra
datinglibre/datinglibre-app-api
biberltd/corebundle
bricre/symfony-bundle-test
biberltd/logbundle
dominium/http-adapter-bundle
dominium/google-analytics
a4sex/auto-clean-entity
christhompsontldr/laravel-inky