Take the 2-minute tour ×

I have a html template file, i am using server side java code to fill in the template and now want to print the file on the same server. Now when i print it, html tags are also coming. What should i do to get html formatting also rather than tags?

share|improve this question
add comment

1 Answer

up vote 2 down vote accepted

A browser is an HTML rendering engine. If you want the HTML to be rendered ("formatted") you need a browser or some alternate rendering engine.

If you want to print from the command line, you can use a command line printing tool such as Command Line Print, which will send your document through Firefox like this:

firefox -print http://www.example.com/index.html


firefox -print file://path/to/your/file.html
share|improve this answer
If only that extension worked on Firefox>3... :( Any good alternatives? –  weronika Jan 7 '13 at 19:37
add comment

Your Answer


