Jan Willem Stumpel wrote:

> 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.
Yes, please.

> 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.
Actually, my statement was a little bit premature.
I had just quickly tried soffice -p to see if the option is supported 
at all but it ignores it without a file name and comes up with the GUI.
With a file name, soffice does TRY to print but also it fails to print 
apparently because it depends on a properly configured Unix printer 
channel. Can it be told to just produce PostScript output?


> > 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.
Since cups is claimed to be capable of printing UTF-8, there must 
be some way to use the software in the cups package to transform 
UTF-8 into PostScript, I thought (or does it use Ghostscript, in turn?).
If texttops doesn't do it, it's probably useless and should be removed 
from the cups package (as it's not documented anyway).


> > [..] 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.
This is not surprising with a proportional font.
Try paps --family fixed, it produced perfect output of your file here 
(although not of all files, however).
Maybe I should hardwire this option in my uprint script.


> > 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
Once uprint is properly installed (see below), it can be invoked from 
mined in the File menu, item "Print".
You can also call uprint directly and I plan to install uprint to 
/usr/bin for the next release.

> [EMAIL PROTECTED]:~$ mined mytest.txt
> sh: /usr/share/mined/uprint: Permission denied
Please try chmod +x /usr/share/mined/uprint.
I wonder how this failed to install properly. Did you install mined 
from its source package or from some other package (e.g. SuSE)?

> and only the ASCII chars were printed correctly (with everything
> else turned into a horrible mess, like with a2ps).
If uprint fails to work, mined tries to print with either $LPR (which 
you can configure to your own spooling command if you need) or 
lp/lpr as a fallback. So if lp (or cups?) does not work for UTF-8, 
this last resort is a weak one :(
Maybe I should add a warning message to make this clear.


> > 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.
Can you please try right-to-left and combining characters? See the 
file enclosed.

> ... 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.
Thanks for the hint, so I'll also add a BOM once I get ooffice working; 
I need the PostScript output mode to be able to test it here.


Best regards,
Thomas


Attachment: example
Description: Binary data

Reply via email to