Installation
The following features are only tested / supported on linux hosts:
- General: QFQ is coded to run on Linux hosts, preferable on Debian derivates like Ubuntu.
- HTML to PDF conversion - command wkhtmltopdf and qfqpdf.
- Concatenation of PDF files - command pdfunite.
- Convert of images to PDF files - command img2pdf.
- PDF decrypt (used for merge with pdfunite) - command qpdf.
- PDF decrypt (used for merge with pdfunite) - command gs - in case qpdf is not successful.
- PDF fix (used for merge with pdfunite) - command pdf2ps and ps2pdf - in case qpdf is not successful.
- Mime type detection for uploads - command file.
- Split PDF into JPG - command convert.
- Repair PDF - command pdftocairo.
- Convert HEIC/HEIF to png - command heif-info and heif-convert.
Preparation
Report & Form
To normalize UTF8 input, php-intl package is needed by
- normalizer::normalize()
For the :ref:`download` function, the programs img2pdf, pdfunite, qpdf, gs, pdf2ps, ps2pdf and file are necessary to concatenate PDF files.
Preparation for Ubuntu:
sudo apt install php-intl
# for file upload, PDF and 'HTML to PDF' (wkhtmltopdf), PDF split
sudo apt install poppler-utils libxrender1 file pdf2svg qpdf ghostscript img2pdf libheif-examples
sudo apt install inkscape imagemagick # to render thumbnails
HTML to PDF: qfqpdf
The below named wkhtml becomes more and more outdated (no further development). As a replacement, QFQ started to use puppeteer (https://developers.google.com/web/tools/puppeteer/). The tool can't be used directly, a wrapper is neccessary which is available under https://git.math.uzh.ch/bbaer/qfqpdf. The wrapper uses and installs always the latest version of puppeteer. On first start and during updates, it might take longer to render a pdf.
Installation:
mkdir /opt/qfqpdf; cd /opt/qfqpdf
curl -L -o qfqpdf https://www.math.uzh.ch/repo/qfqpdf/current/qfqpdf-linux
chmod a+x qfqpdf
./qfqpdf --version
HTML to PDF: wkhtmltopdf
wkhtmltopdf will be used by QFQ to offer 'website print' and 'HTML to PDF' conversion. The program is not included in QFQ and has to be manually installed.
- The Ubuntu package wkhtmltopdf needs a running Xserver - this does not work on a headless webserver.
- Best is to install the QT version from the named website above.
- In case of trouble with wkhtmltopdf, also install 'libxrender1'.
- The current version 0.12.4 might have trouble with https connections. Version 0.12.5-dev (github master branch) seems more reliable. Please contact the QFQ authors if you need a compiled Ubuntu version of wkhtmltopdf.
In :ref:`configuration` specify:
config.cmdWkhtmltopdf: /opt/wkhtmltox/bin/wkhtmltopdf
config.baseUrl: http://www.example.com/
If wkhtml has been compiled with dedicated libraries (not part of LD_LIBRARY_PATH), specify the LD_LIBRARY_PATH together with the path-filename:
config.cmdWkhtmltopdf: LD_LIBRARY_PATH=/opt/wkhtmltox/lib /opt/wkhtmltox/bin/wkhtmltopdf
Important
To access FE_GROUP protected pages or content, it's necessary to disable the [FE][lockIP] check! wkhtml will access the Typo3 page locally (localhost) and that IP address is different from the client (=user) IP.
Configure via Typo3 Installtool All configuration > $TYPO3_CONF_VARS['FE']:
[FE][lockIP] = 0
Warning
[FE][lockIP] = 0
disables an important anti-'session hijacking' protection. The security level of the whole installation
will be lowered! Again, this is only needed if wkhtml needs access to FE_GROUP protected pages & content. As an
alternative to lower the security level, create a separated page subtree which is only accessible (configured via
Typoscript) from specific IPs or if a FE-User is logged in.
If there are problems with converting/downloading FE_GROUP protected pages, check :ref:`configuration` showDebugInfo = download to debug.