This vagrant box can be used with wkhtmltopdf-nodejs-ws-server and wkhtmltopdf-nodejs-pdfapi npm packages.
You need following software to be installed:
- VirtualBox.
- Vagrant.
- Ansible.
Vagrant box contains following installed software:
- Ubuntu 14.04 x64
- Wkhtmltopdf 0.12.2 with dependencies
- Xvfb display server
- Git
- Open and change Vagrantfile.dist to fit your needs, then rename it to Vagrantfile.
- Run vagrant up from the folder where Vagrantfile is located and it will do all job.
After vagrant box is installed you can access vagrant box via ssh by running vagrant ssh command. Then you can run any js file like nodejs script_name.js from /app folder.
#Examples
- Pdf generation using wkhtmltopdf-nodejs-pdfapi: https://github.com/GrizliK1988/wkhtmltopdf-nodejs-pdfapi
- Websocket server usage that handles pdf generation located here: https://github.com/GrizliK1988/wkhtmltopdf-nodejs-ws-server