Convert html file to PDF console Debian 10
Below a very simple guide with which we will learn in a few moments to convert our file to a pdf file html.
Let's get started
For starters log on to the console and update packages and repositories:
1 2 | apt-get update apt-get upgrade |
the next step is to install htmldoc, it's a program that will do all the work for us 🙂
1 | apt-get install htmldoc -y |
Help is available on command:
1 | htmldoc --help |
About us prepare a sample file that you want to convert:
We create a new file:
1 | nano test.html |
The content:
1 2 3 4 5 6 7 8 | <html> <head> <title> To jest mój pierwszy plik PDF </title> </head> <body> To jest treść mojego pierwszego pliku PDF. </body> </html> |
save.
Generate pdf file is done with the command:
1 | htmldoc --webpage -f test.pdf test.html |
No Polish characters in the pdf file 🙁