HTMLDOC is a program that reads HTML and Markdown source files or web pages and converts these into corresponding EPUB, HTML, PostScript, or PDF files with optional tables of contents.
HTMLDOC was developed in the 1990's as a documentation generator for my previous company, and has since seen a lot of usage as a report generator embedded in web servers. However, it does not support many things in "the modern web", such as Cascading Style Sheets (CSS), PDF Encryption (other than 128-bit RC4), PDF forms, complex HTML tables (other than HTML-3.2), Unicode with right-to-left text formatting, Emoji.
HTMLDOC can run from the command line (CLI) as well as with a graphical user interface (GUI). It also supports operation as a CGI program for a web server to provide PDF-formatted output from a web page. The GUI starts automatically if you run HTMLDOC without any options. Since support for Markdown input and EPUB output is still under development, both options are not available from the GUI, but only from the CLI.