Download the PHP package creativesynergy/silverstripe-wkhtmltopdf without Composer

On this page you can find all versions of the php package creativesynergy/silverstripe-wkhtmltopdf. 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 silverstripe-wkhtmltopdf

This module is now abandoned, for SilverStripe 4 you can use my new and improved version silverstripe-wkhtmltox


Create PDFs in SilverStripe with the power of WKhtmlTOpdf

This module adds the possibility to simply create PDFs from every DataObject you have. Based on WKhtmlTOpdf and mikehaertl's php wrapper.

Installation

Getting started

  1. WKhtmlTOpdf must be installed on your server to use this module
  2. You'll need to copy the footer.html and header.html files from the module templates folder to mysite/templates/Pdf/
  3. Create a css file called 'pdf.css' located under themes/your-theme/css/

Usage

Basics

Add a cover

Add pages

Add specific options for one page

All available options can be found here

Add a page and pass some variables to it

Change the page template

By default the module will look for a template called "ClassName_pdf"

Preview in browser

Save

Specify the folder to save in

Download

Global options

Set the global options used for all pages in this pdf

Set or modifiy only one global option

Remove one global option

Templates, Header & Footer and Styling

Page template

If your page ist based on an DataObject and you generate the html with the $pdf::getHtml() function, you'll be able to set a specific template to use for this page by passing it as third parameter to the function (without the .ss ending!). By default, the module will search for a template called "Classname_pdf".

Header & Footer

WKhtmlTOpdf let you specify seperate files for your pdf's header and footer section. By default they are located under mysite/templates/Pdf/header.html and mysite/templates/Pdf/footer.html.

You can change the location of those files or remove the header and/or footer completely by changing the global or page specific options.

Demo Pdf.ss, header.html and footer.html files are included to get you started

Styling

Thanks to WKhtmlTOpdf you have full CSS3 and HTML5 support and will be able to do fancy things "without" the limitations you'll have to face while using other tools like dompdf or tcpdf. You can even use javascript to modify your pages.

By default the module requires a pdf.css in under themes/your-theme/css/pdf.css You can change this by setting the global or page specific option


All versions of silverstripe-wkhtmltopdf with dependencies

PHP Build Version
Package Version
Requires silverstripe/framework Version ^3.2|^4
mikehaertl/phpwkhtmltopdf Version ^2.1
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 creativesynergy/silverstripe-wkhtmltopdf contains the following files

Loading the files please wait ....