Download the PHP package luketowers/oc-snappypdf-plugin without Composer

On this page you can find all versions of the php package luketowers/oc-snappypdf-plugin. 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 oc-snappypdf-plugin

About

October-fied wrapper around the wkhtmltopdf and wkhtmltoimage conversion libraries provided through the barryvdh/laravel-snappy package.

Installation

To install from the Marketplace, click on the "Add to Project" button and then select the project you wish to add it to before updating the project to pull in the plugin.

To install from the backend, go to Settings -> Updates & Plugins -> Install Plugins and then search for LukeTowers.SnappyPDF.

To install from the repository, clone it into plugins/luketowers/snappypdf and then run composer update from your project root in order to pull in the dependencies.

To install it with Composer, run composer require luketowers/oc-snappypdf-plugin from your project root.

NOTE: On some Linux systems you may need to install the following dependencies (generally when the process fails with "The exit status code 127 says something went wrong"). Pulled from https://github.com/barryvdh/laravel-snappy/issues/68.

If you get "The exit status code 1 says something went wrong" you may need to install the following dependencies. Pulled from https://github.com/wkhtmltopdf/wkhtmltopdf/issues/3001#issuecomment-309673453

NOTE: You might not be able to install libssl1.0-dev in Homestead, make sure you run sudo apt-get update first.

Configuration

The main configuration values that you may wish to change would be the paths to the executable binaries for wkhtmltopdf and wkhtmltoimage. These binaries are pulled into plugins/luketowers/snappypdf/vendor/bin by default (when installing from the marketplace) and the default configuration reflects this. Also supported by default is installing by cloning the repository and loading the dependencies with composer update (where the binaries will be located in your project's vendor/bin).

If you need to change the path used to locate those binaries, then you have a few options. If you are already using .env files for environment level configuration then you can simply add SNAPPY_PDF_BINARY and SNAPPY_IMAGE_BINARY with their respective paths to your .env file and call it a day.

If you are not using .env files, or you need to change a configuration value other than the binary paths; then you can override this plugin's configuration and change the necessary values by copying config/config.php from the plugin into your project's config/luketowers/snappypdf/config.php file (as specified in the OctoberCMS docs).

Usage

When using this plugin, it is highly recommended that you add a dependency on it to the plugin you are using it from.

In order to use the libraries provided by this plugin (SnappyPDF and SnappyImage), simply import them with use statements at the top of your PHP files.

Stream PDF to browser

The example below will render a record from a controller and stream it to the browser for downloading or viewing.

Return a PDF to the AJAX framework for downloading

More information on utilizing the libraries is available at the barryvdh/laravel-snappy repository and the wkhtmltopdf manual.


All versions of oc-snappypdf-plugin with dependencies

PHP Build Version
Package Version
Requires composer/installers Version ~1.0
h4cc/wkhtmltopdf-i386 Version 0.12.*
h4cc/wkhtmltoimage-i386 Version 0.12.*
h4cc/wkhtmltoimage-amd64 Version 0.12.*
h4cc/wkhtmltopdf-amd64 Version 0.12.*
wemersonjanuario/wkhtmltopdf-windows Version 0.12.*
barryvdh/laravel-snappy Version ~1.0
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 luketowers/oc-snappypdf-plugin contains the following files

Loading the files please wait ....