HTMLDoc is a special dynamic postscript document parser (PDF 1.6). This guide is intended to install HTMLDoc on Ubuntu 18.04. After installing HTMLDoc, the creation of a simple one-page document will continue without any headers, footers, borders, or additional elements.
Preparing Ubuntu 18.04 for HTMLDoc
First, we need to check for updates for installed packages. We recommend installing software updates, as well as the kernel itself. To check for updates available for your system, enter the following:
apt-get update && apt-get upgrade -y
Now you can install HTMLDoc
apt-get install htmldoc -y
Next, you’re ready to start creating PDF documents from HTML markup
Create Your First PDF From HTML
Next, you need quick testing, a new feature from the command line. Go to the directory below.
Now you need to create a simple HTML document, which we will use to create a PDF document. It will be named example-doc.html
Next, add the HTML markup to it
<html> <head> <title>My first PDF from HTML</title> </head> <body> This is the body of my first PDF document made from HTML. </body> </html>
Save the file by pressing CTRL + X then Y to save the changes. Next, you can instruct HTMLDoc by parsing the PDF from your example-doc.html
htmldoc --webpage -f postscript-output.pdf example-doc.html