Download the PHP package steamulo/pdfjs-viewer-bundle without Composer
On this page you can find all versions of the php package steamulo/pdfjs-viewer-bundle. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download steamulo/pdfjs-viewer-bundle
More information about steamulo/pdfjs-viewer-bundle
Files in steamulo/pdfjs-viewer-bundle
Package pdfjs-viewer-bundle
Short Description This bundle provides an integration of pdf.js from mozilla with Symfony 3 framework and customizable parameters on server side
License MIT
Informations about the package pdfjs-viewer-bundle
JjalvarezlPDFjsViewerBundle
This bundle provides a simple integration of the "PDF.JS library" from mozilla into Symfony 4 with different custom parameters.
Following features are supported:
- Access to pdf outside from web directory.
- Customizable pdf viewer options.
- PDF.js incorporated until 23/03/2017.
Available at:
Why use this?:
- This bundle renders a pdf with on server side. For this reazon you can have an alternative solution to the default browser viewer that can variate the way that a pdf can be loaded on each browser type.
- This bundle can access files in every part of the server.
- This bundle can delete the pdf after rendering it.
Installation
1) Download JjalvarezlPDFjsViewerBundle
Its necessary to provide the bundle's name in order to download it:
2) Enable the bundle
Enable the bundle in the kernel:
3) Install assets
Don't forget to install assets, is the only way that this bundle works:
Concepts before usage:
First at all, its necessary to establish some taxonomy an initial concepts in order to understand how it works:
- Webroot: is the web folder of Symfony
- "PDF.js" works only in webroot folders in all kind of projects.
- This bundle enables to "PDF.js" to show pdf files in any place that you need to obtain them.
- It makes a temporal copy with the absolute path of the pdf file in a custom temporal dir inside webroot (defined by the developer). So make sure about the right permissions (files + owner).
- Once "PDF.js" loads the pdf file, this bundle can immediately delete it from webroot in order to avoid issues such as disk space overflow.
- This bundle also can show or hide visual "PDF.js" components.
All those features can be performed with parameters which have only true / false values as follows:
Usage
You can choose from different ways to use this bundle:
Fast testing
You can verify functionality in multiple browsers, you can enable the default "PDF.js viewer" with same loaded pdf in your function controller that returns a response:
Default viewer
This shows same pdf viewer as the fast testing but its necessary to configure some extra parameters:
Custom viewer
Also, you can customize which elements from viewer you want to display by editing the parameters:
Here you can play with this parameters as you wish for customize the pdf viewer.
Support
- Email: [email protected]
Please email me if you see something wrong or abnormal.
You can always be a contributor or you can add an issue here
All versions of pdfjs-viewer-bundle with dependencies
symfony/http-foundation Version ^4.0|^5.0|^6.0
symfony/framework-bundle Version ^4.0|^5.0|^6.0
sensio/framework-extra-bundle Version ^6.1
twig/twig Version ^2.0|^3.0