From the KnowledgeBase

Linux: How to convert html files to postscript format; print html files
Convert html files to postscript format. Print html files from Linux.


A freeware, proven to work Perl script can be used to convert html files to postscript format. The resulting ps files can be sent to a printer. This is especially useful when producing custom reports in easily formattable and simple HTML format. Such reports can be displayed online or printed after converting to postscript format one at a time or in a batch mode; resulting in a simple and highly reusable code.

1. Ensure that html2ps is installed on the server by executing the following command: perl /usr/local/bin/html2ps -v

2. If the script is not on the server create a ticket for Platform Services asking to install html2ps version 1.0 beta3 (it is very stable). Alternatively the latest version can be downloaded from:

3. Here is simple command to get started quickly

perl /usr/local/bin/html2ps test.html >

4. File can be printed by executing the following command:

/usr/ucb/lpr -P hp126alex124

Print job status can be checked by executing:

/usr/ucb/lpq -P hp126alex124

5. Below please find a web site with all of the html2ps documentation. It is recommended reading to see how custom configuration files can be created and what they can be used for:

Last Updated:
July 27, 2012

Solution ID: