Score:1

How to print HTML file from command-line in Ubuntu

cn flag

How to print HTML file from command line in Ubuntu when I run the below command it only prints the content of the HTML file, not the rendered content.

lp template.html -d TVS_MSP-250CH-custom
vanadium avatar
cn flag
It is quite normal that `lp` prints the text that is in the file, without further processing.
Score:1
cn flag

The lp command considers your html as a text file. You will first need to render the HTML to a file which CUPS recognizes and interprets, i.e., PostScript, PDF, and image files besides text.

htmldoc can generate postscript or PDF output of HTML (Install with sudo apt install htmldoc). pandoc can also be used.

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.