Download the PHP package oat-sa/extension-tao-booklet without Composer
On this page you can find all versions of the php package oat-sa/extension-tao-booklet. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download oat-sa/extension-tao-booklet
More information about oat-sa/extension-tao-booklet
Files in oat-sa/extension-tao-booklet
Package extension-tao-booklet
Short Description An extension for TAO to create test booklets (publishable in MS-Word and PDF along with Answer Sheets)
License GPL-2.0-only
Homepage http://www.taotesting.com
Informations about the package extension-tao-booklet
extension-tao-booklet
An extension for TAO to create test booklets (publishable in MS-Word and PDF along with Answer Sheets)
Warning
Due to the move to ES2015
, some code might not work on legacy browsers.
Especially for code that use to rely on polyfills, like for the Promise
.
The polyfills are now linked only when the code is bundled, and are not reachable anymore in development mode.
For that reason, and because wkhtmltopdf
is not supporting ES2015 and requires polyfills,
the generation of PDF only works with bundled version (aka production mode).
From version 4.2.0
of taoBooklet
, the page rendered to get the PDF will always use bundles transpiled to ES5. This applies no matter if the mode is set to development or production.
This implies that any change made to the source code will need to pass trough a re-bundling:
For version 4.1.1
and older, you still need to activate the production mode as follows:
- open the config file
config/generis.conf.php
, and set the constantDEBUG_MODE
tofalse
(around line 50):
Configuration
The file config/taoBooklet/wkhtmltopdf.conf.php
contains entries for setting up the tool:
'binary'
- The path to the installed binary, usually/usr/local/bin/wkhtmltopdf
.'options'
- A set of option for controlling the rendering. See below.
wkhtmltopdf options
Option | Description | Default value |
---|---|---|
'header-html' |
The path to the header template added to each page. | 'taoBooklet/views/templates/PrintTest/header.html' |
'footer-html' |
The path to the header template added to each page. | 'taoBooklet/views/templates/PrintTest/footer.html' |
'margin-bottom' |
The margin added to top of the page. | 10mm |
'margin-top' |
The margin added to bottom of the page. | 10mm |
'page-size' |
The page size format: A4, Letter, etc. | 'A4' |
'orientation' |
The page orientation: Portrait or Landscape. | 'Portrait' |
'user-style-sheet' |
Specify a user style sheet, to load with every page. | none |
Note: additional options supported by wkhtmltopdf can be added here too. For a complete list, see: https://wkhtmltopdf.org/usage/wkhtmltopdf.txt
Requirements
This extension needs a third-party tool to generate the PDF files.
So to be able to generate the booklet, you should install wkhtmltopdf
on your server.
If you are using Ubuntu you can use these commands:
However, depending on the version of your system, the installed version of wkhtmltopdf
may
not fully comply with the requirements, as there is some issues with QT when trying to render
header and footers. If you encounter errors when generating the document, you should install
the tool using these commands:
After that you can use /usr/local/bin/wkhtmltopdf
in your configuration
For Debian-based distributions, you may need to do an additional step to install some dependencies:
If the previous steps fail, you may try to use a binary, non-packaged distribution instead.
Please refer to https://wkhtmltopdf.org/downloads.html for an updated list of
wkhtmltopdf
packages for Ubuntu and other distributions. You may find a list of
source, binary and packages for v0.12.5 at GitHub as well.
Deprecated: Please note that the version 0.12.4 has a bug which was fixed in the version 0.12.5: sometimes footers and headers not provided in the pdf
All versions of extension-tao-booklet with dependencies
mikehaertl/phpwkhtmltopdf Version ^2.4
tecnickcom/tcpdf Version ^6.2
jurosh/pdf-merge Version ^2.0
oat-sa/generis Version >=14.0.0
oat-sa/tao-core Version >=50.26.0
oat-sa/extension-tao-delivery Version >=15.0.0
oat-sa/extension-tao-delivery-rdf Version >=14.0.0
oat-sa/extension-tao-outcome Version >=13.0.0
oat-sa/extension-tao-outcomeui Version >=10.0.0
oat-sa/extension-tao-test Version >=15.0.0
oat-sa/extension-tao-qtiprint Version >=3.2.0