Allows editors to create a PDF with chapters from Terapirekommendationer
This plugin uses PrinceXML to create the PDF file. It needs to be installed on the server. The plugin will look for the installed Prince binary in /usr/bin/prince
. If it's installed elsewhere, update this line with the correct path.
Follow the instructions below or the official instructions for installing PrinceXML on Ubuntu.
- Download the installation package somewhere on your server:
$ cd ~
$ wget https://www.princexml.com/download/prince_12.2-1_ubuntu18.04_amd64.deb
All available versions of PrinceXML can be found here.
- Install gdebi on the server:
$ sudo apt install gdebi
- Install the downloaded package using gdebi:
$ sudo gdebi ~/prince_12.2-1_ubuntu18.04_amd64.deb
- Make sure that PrinceXML is installed. The following command should return a version number and some information about the package:
$ prince --version
- In your theme or Wordpress site, install the plugin via Composer:
$ composer require regonhalland/print-terapirekommendationer
Use gulp to build assets. The following gulp tasks are defined:
watch
- Watch for changes in the./src
directory.build
- Minifies and compiles assets into the./dist
directory.
Make sure that the plugin is activated under Plugins โ Print Terapirekommendationer.
Go to Settings โ Print Terapirekommendationer, select the chapters you want to print and click Ladda ner PDF.
The PDF will be generated and downloaded automatically.