Download the PHP package dante918/livewire-pdf-preview without Composer

On this page you can find all versions of the php package dante918/livewire-pdf-preview. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package livewire-pdf-preview

GitHub release

Example

livewire-pdf-preview-gif-2

Installation

You can install the package via composer:

Please skip the next few installation steps if your application already has PDF.js installed.

Next, you must export the package public scripts. To do this run

This command will export a vendor/livewire-pdf-preview folder under the public directory of your app which is used by the @livewirePdfPreviewScripts directive.

include the @livewirePdfPreviewScripts directive next to your other app scripts

Requirements

This package requires the following packages/libraries to work:

Please follow each package/library instructions on how to set them properly in your project.

Note: if you run the installation command and added the directives, that installs PDF.js.

Usage

You'll have a livewire component with an upload field, then the canvas, like so:

If you already have PDF.js in your application, you'll have to specify the pdf.worker.js path and pass it to the component. This is not required if that JS was set up via the command + @livewirePdfPreviewScripts method.

Be sure that your component has the WithFileUploads trait, if you are using Livewire file uploads. More information can be found in the Livewire documentation.

It's preferred to always have the key attribute for this component so that it will re-render any time the PDF has been changed.

Contributing

Feel free to open Pull requests with bug fixes and features. I'll do my best to keep an eye on those. Feel free to open issues with bug reports or feature requests. Bug fixes will take priority. I welcome contributions from the community and look forward to working with you to improve this project.

Contributors


All versions of livewire-pdf-preview with dependencies

PHP Build Version
Package Version
Requires livewire/livewire Version ^3.5
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dante918/livewire-pdf-preview contains the following files

Loading the files please wait ....