Install enscript by entering the following commands in the terminal:
sudo apt update sudo apt install enscript
Description:
converts text to Postscript, HTML or RTF with syntax highlighting
GNU Enscript takes ASCII files (often source code) and converts them to PostScript, HTML or RTF. It can store generated output to a file or send it directly to the printer. . It is often used for its syntax highlighting, as it comes with rules for a wide range of programming languages. New rules can be added using an awk-like stateful scripting language.
Homepage: http://www.gnu.org/software/enscript/
Version: 1.6.5.90-3
Section: universe/text