Sometimes we want to save something from a website in PDF on our PC, for this there is the tool: wkhtmltopdf
That is, through a command we can save X page in .pdf, but first let's install the application:
In Debian, Ubuntu or derivatives, just install wkhtmltopdf:
sudo apt-get install wkhtmltopdf
It will install its dependencies such as webkit and some qt libraries, but they are libraries and nothing strange 😉
In other distros I imagine that the package must be named the same.
Once we have it installed, using it is really simple, for example we are going to save www.google.com:
wkhtmltopdf www.google.com google.pdf
That is, we pass the URL of what we want to save as the first parameter, and the name and .pdf of the final file we want as the second parameter.
I leave a screenshot of how the .pdf is shown to me:
And here is the .pdf: