Thomas Wolff wrote:
ooffice -p <file>

On my system OpenOffice 1.1.3 and 2.0 are installed but there is no script ooffice anywhere. The program to start is called soffice but it does not handle a -p option. Which script do you
 refer to?

On my (Debian) system it is in /usr/bin. The comment at the
beginning says 'based on the Mandrake work'. Maybe not all
distributions have it. I'll mail it to you by separate mail, if
you like.

I also have a soffice script. It is in
/usr/lib/openoffice/program, which (on my system) is not in the
PATH, so it has to be called with its full pathname; but then it
*does* respond to the -p option, so it can be used for printing.

I tried to find a reliable and decent UTF-8 printing interface for use with my text mode editor mined (http://towo.net/mined/), but the situation appears to be very unsatisfying: * I have never succeeded printing UTF-8 with lpr/cups. * I tried to use the internal cups filter texttops directly but it only seems to print ASCII (not even Latin-1). As it is completely undocumented, I'm stuck.

Perhaps it uses a2ps; that hardly understands anything. The 'text'
driver for my new printer (Brother HL2030) also uses it, but it
is pretty useless unless you are guaranteed never to use accented
letters or any other 'strange' character.

[..] Then I found the paps program (http://imagic.weizmann.ac.il/~dov/freesw/paps/). It provides the best coverage of Unicode features. It needs Pango installed and font configuration needs to get accustomed to (and if you need to install Pango yourself and are not root, you'll have a lot of trouble installing and configuring paps). Unfortunately, although it covers Unicode better than uniprint, its typographic qualities are lower, some spacing problems, resolution depedency...

Interesting program! But it made an utter mess of the 'sudoku' in
the enclosed test file. And so does uniprint. Spacing problems
indeed.

My findings resulted in the script uprint which is part of my mined package. The script tries to print with paps if available, or with uniprint otherwise.

How does one use uprint? I compiled paps, put it in
/usr/local/bin/, but neither uniprint nor paps were used by mined,
and I got a message

[EMAIL PROTECTED]:~$ mined mytest.txt
sh: /usr/share/mined/uprint: Permission denied

and only the ASCII chars were printed correctly (with everything
else turned into a horrible mess, like with a2ps).

I'd like to add ooffice as an option if that turns out to work.

It certainly gives much better print results, with a proper
'monospaced' look based on a Courier font. Just like text printing on my old Laserjet, but enhanced with utf-8 capabilities. It printed the enclosed test file entirely correctly. BTW ooffice could *not* print the sudoku correctly if it was in a file by itself (without any other text present). That's why the Byte Order Mark is needed. Because ooprint (unlike ooffice itself) accepts input from stdin, I can now also pipe the output of the sudoku program directly into ooprint.

Regards, Jan
UTF-8 TEST PAGE

A sudoku with UTF-8 box characters:

╔═══╤═══╤═══╦═══╤═══╤═══╦═══╤═══╤═══╗
║ 7 │ 9 │ 8 ║ 6 │ 2 │ 4 ║ 3 │ 1 │ 5 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 3 │ 1 │ 5 ║ 8 │ 7 │ 9 ║ 2 │ 4 │ 6 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 2 │ 6 │ 4 ║ 3 │ 1 │ 5 ║ 9 │ 7 │ 8 ║ 
╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
║ 1 │ 2 │ 9 ║ 5 │ 8 │ 7 ║ 4 │ 6 │ 3 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 6 │ 8 │ 3 ║ 2 │ 4 │ 1 ║ 7 │ 5 │ 9 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 4 │ 5 │ 7 ║ 9 │ 3 │ 6 ║ 1 │ 8 │ 2 ║ 
╠═══╪═══╪═══╬═══╪═══╪═══╬═══╪═══╪═══╣
║ 9 │ 4 │ 2 ║ 1 │ 5 │ 8 ║ 6 │ 3 │ 7 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 5 │ 3 │ 1 ║ 7 │ 6 │ 2 ║ 8 │ 9 │ 4 ║ 
╟───┼───┼───╫───┼───┼───╫───┼───┼───╢
║ 8 │ 7 │ 6 ║ 4 │ 9 │ 3 ║ 5 │ 2 │ 1 ║ 
╚═══╧═══╧═══╩═══╧═══╧═══╩═══╧═══╧═══╝

Japanese:

東京都渋谷区上原。豚カツでございます。

Korean:
감사합니다.

Latin-1 and Extended Latin:
Røtelflöt. Hélène. Hōrensō.

Greek:
απαγορεύεται το κάπνισμα

Russian:
Владимир Путин 

Reply via email to