Posts Tagged ‘groff’

printing man pages (or fun with a Xerox N2025 and groff settings)

Sunday, December 24th, 2006

I’ve recently been playing with LDAP, and somewhere along that route I wanted to print out some man pages.

Usually, this is very easy, with a simple man -t ldap_result | lpr command (should one wish to print out the ldap_results man page).

But (you knew there was a but coming, right?) there were some problems.

Firstly, my humble printer, an N2025, decided to play up. A couple of paper jams in a most invonveinent spot meant removing most of its bits before it was happy to continue. Sometimes printers are just a bit too much of a jobsworth and insist that you do all the steps in their recovery proceedure even if you remove the jam in the first step of 12.

Secondly, my pages were being rendered on US letter, and the printer gets a tad confused, since its loaded up with A4. After much digging around, it seems that groff had been installed with a default page size of letter. Tweaking /usr/share/groff/1.19.2/font/devps/DESC to tell it to use A4 was simple… spending an hour of so locating the reason was no so fun. Again, its a usability issue: the software was installed on a machine lcoated in Europe, so why did it have a setting more suited for the US? Honsetly, making software more locale aware isn’t a big issue; the usual problem is that most programmers only think for their locale and don’t really consider that people elsewhere do things a little bit differently.