cmd:html2ps 

Usage 

Casual Printing 

html2ps -T $fl > $tf; gv $tf
lpr -hw $tf
-w
   Writes a message on the user's terminal after the files have
   been printed.

follow links within/below directory 

html2ps -T -W b -C h toc.html

Picture Printing 

html2ps -2 -L -C h -W b RNI-index.html | lpr -C"letter hduplex" &
  • with graphics and sub-files !
  • no use to use "hide -b" because it is a perl script.

Settings 

alias html2ps='html2ps $HTML2PS'
 HTML2PS=-2 -L
  1. two columns
  2. Landscape

Change page setting 

in ~/s/scripts/tdat/html2psrc:

paper {
  type: letter;
}

change it from letter to A4.

Version 1.0b3 

16-Aug-2000, <<:2002.08.10 Sat:>>

http://www.tdb.uu.se/~jan/html2ps-1.0b3.tar.gz

Installation 

run ./install!

Version: 1.0b1 

Source:
http://www.tdb.uu.se/~jan/html2ps-1.0b1.tar.gz  []

documented on: 06-22-99

Installation 

Unpack, run ./install, it will collect the path for everything it needs then ask lots of questions of which to be installed where. Better answer the first path with *abs* home addr, i.e. /home/…/tongsun/

install path: /opt
ln -s  ~/s/scripts/tdat/html2psrc /opt/lib/html2ps/html2psrc

Test run 

alias html2ps='html2ps $HTML2PS'
html2ps -T -C h html2ps.html | lpr -C"letter hduplex" &

Run 

html2ps -f :pj perlform.html | lpr -h &
-f include in other options file

Config file 

Use local configuration file ($HOME/.html2psrc)

Comments 

pro - Works fine for pod2html outputs. - The "autosize" feature of PS for the <PRE> output is really neat! - Size perfect when doing a 2-up printing

con - Can't work for all cases (e.g. unix??.htm). - Works fine for most of them. - Option "-W a" (follow all links) does a poor job and did not gather all, nor did it get in the right order. Test on notes 3703. but -W b seems works fine!

Help 

Detail Help 

DSC compliance

By default html2ps produces PostScript code that is not DSC compliant. The
practical implication of this is that it will not be possible to use the
code with PostScript filters for n-up printing, reordering of pages, etc.
It is also not possible to jump to a certain page directly in previewers
such as Ghostview.
The advantage with the non-DSC code is that it can be 'reused' by html2ps:
you can rebuild an already generated PostScript file using new command line
options and configuration files. This is done by running html2ps with the
new options, and with the old PostScript file as input. This can save a lot
of time and bandwidth when converting remote documents.
It is possible to generate DSC compliant PostScript by using the option -D,
but this requires that Ghostscript is installed, and it can take quite some
time to do. Note: if you are producing PostScript files for others to
download and print, it is strongly recommended that you generate DSC
compliant code (i.e. convert with the -D option).

Option "-W b" (follow links within/below directory) 

Usage 

html2ps -T -W b -C h toc.html > $tf; gv $tf

Trying History 

host:~/man/emacs>html2ps $HTML2PS -T -W b -C h emacs_toc.html > e.ps
Reading emacs_toc.html
At least 48 documents remaining
*** Error opening emacs_1.html
*** Error opening emacs_2.html
*** Error opening emacs_3.html
Reading emacs_4.html
At least 44 documents remaining
Reading emacs_5.html
At least 43 documents remaining
...
Reading emacs_9.html
At least 39 documents remaining
Reading emacs_10.html

Note:

  • Deleting unwanted files is a great trick.
  • Option "-W b" (follow links within/below directory) works well under starting from TOC
  • Option "-W a" (follow all links) is not disireable and will cause error if PERL5LIB not set.
  • Works fine for texi2html outputs (generated with the texi2html)

documented on: 12-18-98