This is a ruby script to fetch webpages and save as pdf. This is written in my effort to learn ruby programming language.
- Clone repository.
$ git clone https://github.com/trhura/webpage2pdf.git
$ cd webpage2pdf
- Get the required ruby gem libraries.
$ bundle install
- Install gir data for webkit.
$ apt-get install gir1.2-webkit-3.0
- Run the script, the webpage will be saved in current directory as pdf using page title as filename.
$ ./webpage2pdf 'http://www.google.com'
- Lots of stuff