Installation

Installation requires full control of the web-server.
This requirement is met in case YetiForce is installed on VPS, dedicated server or local server.
In the event that YetiForce resides on a shared web space or on a cloud, installation can only be carried out by the provider, as long as it allows it.
In cloud case, a convenient alternative is the purchase of the extension by the provider who will make it available to all users.

Step 1: extension installation

PAD PDF Generators installs as a common YetiForce extension:

  1. access the backend in the section Software configuration / Standard modules / Modules - Installation

  2. click on the Install from file button

  3. select the extension zip

  4. follow the procedure

Step 2: packages installation via Composer

Composer must be installed and available on the web-server in order to install the PHP packages: mPDF library, wrapper for wkhtmltopdf and wrapper for Google Chrome.

To install via Composer you need to have installed on the web server:

  • composer

  • git

Furthermore, you will be prompted to enter your personal token to access the repositories.

How to get a personal token on GitHub

  1. register at https://github.com/

  2. access the page https://github.com/settings/tokens/new (re-enter the registration password)

  3. enter a token name (Notes)

  4. check the options - repo - workflow - notifications - user - write: discussion

  5. generate the token (click Generate token)

  6. save the displayed token in a safe place - it will no longer be possible to view it again on GitHub - the alternative is to generate it again

Access the web server via the terminal, run with the same user of the web-server or with a user who has read and write privileges in the YetiForce folders.
important: for security reasons, do not run Composer as root,

Case of access via terminal with the web-server user

Run the following commands

  1. move to the YetiForce “vendor/pad/” folder with: cd vendor/pad/

  2. install via Composer with: composer install

  3. wait for the installation to complete

  4. a new “vendor” folder will be created which will contain all the packages just installed

Case of access via terminal with user different from that of the web-server (but with read and write permissions)

Run the following commands

  1. move to the YetiForce “vendor/pad/” folder with: cd vendor/pad/

  2. install via Composer with: composer install

  3. wait for the installation to complete

  4. a new “vendor” folder will be created which will contain all the packages just installed

  5. assign (via root user or sudo command) the owner/group of the new “vendor” folder and of all the files and folders contained therein (recursive), to the owner/group of the web-server. In other words, the user of the web-server must be able to read and write to all files and folders contained in the new “vendor” folder: just like in all YetiForce files and folders.

Step 3: wkhtmltopdf installation

The wkhtmltopdf package installation is required if you want to use that generator in YetiForce. If you don’t want to activate wkhtmltopdf in Yetiforce (but use other generators) you can skip this step. Download wkhtmltopdf from https://wkhtmltopdf.org/downloads.html Install according to the distribution of the web-server. wkhtmltopdf is available for the following Linux distributions

  • Debian

  • Ubuntu

  • CentoOS

  • Amazon Linux

  • openSuse Leap

  • Arch Linux

Some Linux distributions include wkhtmltopdf package, among the packages available in the distribution itself. The installation of the wkhtmltopdf package, included in the distribution, is not recommended because it often lacks some features. For example, the Debian 10 (Buster) distribution includes wkhtmltopdf, but does not have the header and footer feature of the PDF page. Download from https://wkhtmltopdf.org/downloads.html and install the full version.

Step 4: Google Chrome installation

The Google Chrome package installation is required if you want to use that generator in YetiForce. If you don’t want to activate Google Chrome in Yetiforce (but use other generators) you can skip this step. In almost all distributions there is the Google Chrome package. If not present in the distribution, download and install Google Chrome from https://www.google.com/chrome/

Increase the security level of Google Chrome on the web server It is possible to prevent Google Chrome to access to external sources, limiting access to local resources only. The limitation increases the level of security, while still allowing the use of the PAD PDF Generators extension.

  1. create the folder /etc/opt/chrome/policies/managed/

  2. create a file named URLAllowlist and insert the string {"URLAllowlist": []}

  3. create a second file named URLBlocklist and insert the string {"URLBlocklist": [“*”]}