Tip |
---|
Opigno can be installed on top of an existing Drupal website. Nevertheless, it is more simple and we advise to install it as a Drupal distribution, which means from scratch, without a pre-existing Drupal website. To do that, you have to download Opigno LMS distribution from our website at: https://www.opigno.org/fr/download The installation process is in this case similar to the one for a normal Drupal website, as explained here: https://www.drupal.org/docs/7/install |
...
Opigno offers the possibility of creating certificates and awarding them given certain lesson requisites. By default Opigno ships with the PDF generator dompdf. Despite it being functional, we recommend the installation of wkhtmltopdf.
You will first have to make sure that the "wkhtmltopdf library handler" module is enabled on your Opigno instance, and if not enable it (you can do that in the module management interface, at /admin/modules). Then, on the server side, you will have to follow the following steps (the syntax thereafter is for Debian Jessie or Stretch):
Install wkhtmltopdf :
Code Block apt-get install wkhtmltopdf
Note: If you don't use Debian, you can download it from : http://wkhtmltopdf.org/
Then, extract it and move it to /usr/bin/, and rename it to wkhtmltopdf so that now you have an executable at /usr/bin/wkhtmltopdf, and set permissions: chmod a+x /usr/bin/wkhtmltopdfInstall required support packages:
Code Block apt-get install openssl build-essential xorg libssl-dev
Check to see if it works, run:
Code Block wkhtmltopdf http://www.google.com test.pdf
If it works, then you are done – make sure to make a symbolic link as per number 7. If you get the error "Cannot connect to X server" then continue to number 4.We need to run it headless on a 'virtual' x server. We will do this with a package called xvfb.
Code Block apt-get install xvfb
We need to write a little shell script to wrap wkhtmltopdf in xvfb. Make a file called wkhtmltopdf.sh and add the following:
Code Block xvfb-run -a -s "-screen 0 640x480x16" wkhtmltopdf $*
Move this shell script to /usr/bin, and set permissions:
Code Block chmod a+x /usr/bin/wkhtmltopdf.sh
Finally, make your symbolic link in /sites/all/libraries/wkhtmltopdf. Command is:
Code Block cd /sites/all/libraries/ ln -s /usr/bin/wkhtmltopdf.sh wkhtmltopdf
Then you can change the PDF generator to be used, at Configuration -> User Interface -> Printer, email and PDF versions -> PDF, and choosing wkhtmltopdf.
This interface also makes possible to set the settings for the wkhtmltopdf options. These options can be found at:
http://madalgo.au.dk/~jakobt/wkhtmltoxdoc/wkhtmltopdf_0.10.0_rc2-doc.html