vi command | description |
---|---|
0 | move to beginning of the current line |
$ | move to end of line |
H | move to the top of the current window (high) |
M | move to the middle of the current window (middle) |
L | move to the bottom line of the current window (low) |
1G | move to the first line of the file |
20G | move to the 20th line of the file |
G | move to the last line of the file |
HTML to PDF conversion is very easy in rails and pdfkit will be useful in this case, wkhtmltopdf tool will be supporting tool so you can easily convert an html to pdf. In my experience I used the following steps: gem install pdfkit -v 0.5.0 gem install wkhtmltopdf -v 0.1.2 gem install wkhtmltopdf-binary Some times this sequence will not work, so I use the following as per the instruction from https://github.com/pdfkit/pdfkit/wiki/Installing-WKHTMLTOPDF Be careful to download the appropriate wkhtmltopdf tar ball, it depends on your os architecture, like i386 or 64 wget http://wkhtmltopdf.googlecode.com/files/wkhtmltopdf-0.9.9-static-amd64.tar.bz2 tar xvjf wkhtmltopdf-0.9.9-static-amd64.tar.bz2 mv wkhtmltopdf-amd64 /usr/local/bin/wkhtmltopdf chmod +x /usr/local/bin/wkhtmltopdf Try to convert html to pdf after restarting your web servers. If you get any error like: Errno::ENOENT: No such file or directory then I have a str...
Comments
Post a Comment