Installation¶
Step 1: extension installation¶
PAD PDF Generators installs as a common YetiForce extension:
access the backend in the section Software configuration / Standard modules / Modules - Installation
click on the Install from file button
select the extension zip
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¶
register at https://github.com/
access the page https://github.com/settings/tokens/new (re-enter the registration password)
enter a token name (Notes)
check the options - repo - workflow - notifications - user - write: discussion
generate the token (click Generate token)
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
Case of access via terminal with the web-server user¶
Run the following commands
move to the YetiForce “vendor/pad/” folder with: cd vendor/pad/
install via Composer with: composer install
wait for the installation to complete
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
move to the YetiForce “vendor/pad/” folder with: cd vendor/pad/
install via Composer with: composer install
wait for the installation to complete
a new “vendor” folder will be created which will contain all the packages just installed
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.
create the folder
/etc/opt/chrome/policies/managed/
create a file named URLAllowlist and insert the string
{"URLAllowlist": []}
create a second file named URLBlocklist and insert the string
{"URLBlocklist": [“*”]}