paps (was: Text printing with Openoffice)

2005-11-20 Thread Jan Willem Stumpel

Abel Cheung wrote:

On 11/18/05, Behdad Esfahbod <[EMAIL PROTECTED]> wrote:



Because paps is quite under development right now.



But I still packaged it and uploaded to Mandriva Linux. :-)
Yes, comparing to u2ps (which halted development for some time)
paps is indeed a better solution, though both looks similar.


There is a new version (6.1) on paps.sourceforge.net. With paps 
6.1, boxes drawn with utf-8 'box draw characters' are printed 
correctly, without gaps.


Regards, Jan

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-19 Thread Abel Cheung
On 11/18/05, Behdad Esfahbod <[EMAIL PROTECTED]> wrote:
> > where mytest.txt is a multilingual UTF-8 file, and get a very nice
> > print. This is amazing. I wonder why paps hasn't yet been picked
> > up by the major distributions, so "ordinary users" could install
> > it without having to compile.
>
> Because paps is quite under development right now.

But I still packaged it and uploaded to Mandriva Linux. :-)
Yes, comparing to u2ps (which halted development for some time)
paps is indeed a better solution, though both looks similar.

Abel

>
> --behdad
> http://behdad.org/
>
> "Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
> -- Dan Bern, "New American Language"
>
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:  http://mail.nl.linux.org/linux-utf8/
>
>


--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/
.)��D��-|��ˊ{��v��W�z[��b��m���Yb��h���{���

Re: Text printing with Openoffice

2005-11-17 Thread Behdad Esfahbod
On Thu, 17 Nov 2005, Jan Willem Stumpel wrote:

> where mytest.txt is a multilingual UTF-8 file, and get a very nice
> print. This is amazing. I wonder why paps hasn't yet been picked
> up by the major distributions, so "ordinary users" could install
> it without having to compile.

Because paps is quite under development right now.

--behdad
http://behdad.org/

"Commandment Three says Do Not Kill, Amendment Two says Blood Will Spill"
-- Dan Bern, "New American Language"

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-17 Thread Jan Willem Stumpel

Abel Cheung wrote:


I have also tried using ooffice -p (2.0); actually it doesn't
work well with cjk characters, with characters overlapping each
other; but at least all the characters do print successfully.


Hmm.. I did not see these "overlapping" CJK characters. I wonder
when and why this happens.


The best one I can find to handle cjk characters well is u2ps,
which utilizes pango for font rendering. It is basically a
replacement of a2ps that can recognize unicode, with Arabic
BiDi support; though kde users may not like it too much :-)


Yes, because you must have Gnome; so far I have avoided installing
both KDE and Gnome, and would prefer to go on avoiding them.

But the "paps" program mentioned by Thomas Wolff (which also uses
pango) is really excellent! It is much better than my original
suggestion (openoffice). You just have to experiment with the
options: with the set of fonts that I have installed, it works
best when called as

paps --family "Courier New" --font_scale 10

(it is a filter, using stdin for input and stdout for output).

This can be used as a "drop in" replacement for a2ps in lpd
filters (you cannot do this with openoffice, because of permission
problems). And unlike openoffice, it works on the console (does
not need X). I can now just call

lpr mytest.txt

where mytest.txt is a multilingual UTF-8 file, and get a very nice
print. This is amazing. I wonder why paps hasn't yet been picked
up by the major distributions, so "ordinary users" could install
it without having to compile.

The only problem I found so far is that the spacing between
characters is a little bit too big. Boxes drawn with "box draw
characters" have small gaps in them.

paps selects fonts using fontconfig which I do not understand at
all. I would like to have some "fine control" about which font is
used for which Unicode range of characters. Does anyone know which
config file on Linux can be used for this?

Regards, Jan



--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-15 Thread Abel Cheung
On 11/14/05, Vasilis Vasaitis <[EMAIL PROTECTED]> wrote:
>   I tried printing a simple UTF-8 text file with greek text, and the
> result was quite inadequate. It managed to get the simple letters from
> the Symbol font (I assume), but the accented letters did not get
> printed out at all. The result is both ugly and unreadable for the
> most part.
>
>   The OOo method, on the other hand, handled it fine.

I have also tried using ooffice -p (2.0); actually it doesn't work well with cjk
characters, with characters overlapping each other; but at least all the
characters do print successfully.

The best one I can find to handle cjk characters well is u2ps, which utilizes
pango for font rendering. It is basically a replacement of a2ps that
can recognize
unicode, with Arabic BiDi support; though kde users may not like it too much :-)

Abel


>
> > What I didn't test is double-width (cjk) characters, combining symbols,
> > non-printable characters, invalid UTF-8 sequences and other similar more
> > tricky files. It's easily possible that OOo is better in this respect.
>
>
> --
> Vasilis Vasaitis
> "A man is well or woe as he thinks himself so."
>
>
>
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:  http://mail.nl.linux.org/linux-utf8/
>
>


--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/
.)��D��-|��ˊ{��v��W�z[��b��m���Yb��h���{���

Re: Text printing with Openoffice

2005-11-15 Thread Abel Cheung
On 11/14/05, Thomas Wolff <[EMAIL PROTECTED]> wrote:
> > ooffice -p 
> 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.

Then probably you can search for ooo-wrapper or ooo-wrapper2.0, or
some names like that.

Abel

> 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.
> * I tried uniprint from the yudit package. It produces nicely looking
>   output but fails on some Unicode features, e.g. combining characters
>   or right-to-left.
> * 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...
>
> 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.
> I'd like to add ooffice as an option if that turns out to work.
>
> Kind regards,
> Thomas Wolff
>
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:  http://mail.nl.linux.org/linux-utf8/
>
>


--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/


Re: Text printing with Openoffice

2005-11-15 Thread Abel Cheung
On 11/14/05, Koblinger Egmont <[EMAIL PROTECTED]> wrote:
> What do you mean by multibyte characters?

Hm, my bad habit. What I mean is characters outside iso-8859-* and ASCII range.
Basically, bare lpr is pretty useless outside America and Europe.

Abel

> Of course all the accented letters
> are multibyte characters in UTF-8. I created several simple text files in
> UTF-8 encoding, containing standard accented letters that are also part of
> latin-1 or latin-2 (e.g. e with acute grave, e with acute accent, o with
> double acute) as well as euro symbol, low-99 and high-99 quote marks etc.,
> sent them to the printer with "lpr filename" (with LANG=hu_HU.UTF-8 and no
> other LC_* variables) and they all got printed correctly.
>
> What I didn't test is double-width (cjk) characters, combining symbols,
> non-printable characters, invalid UTF-8 sequences and other similar more
> tricky files. It's easily possible that OOo is better in this respect.
>
>
>
> --
> Egmont
>
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:  http://mail.nl.linux.org/linux-utf8/
>
>


--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/


Re: Text printing with Openoffice

2005-11-15 Thread Jan Willem Stumpel

Thomas Wolff wrote:


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.


Yes, and lpr has to be able to handle PostScript through some
'input filter'.


Can it be told to just produce PostScript output?


No. With -p the output goes directly to the print queue. Actually
it is possible to get ps output on the command line but it is
*very* difficult. You have to install a macro in Openoffice and
then issue a complicated command. This is not really feasible for
'ordinary users'. I forgot to make notes so I have to reconstruct
it, but I started from

http://www.oooforum.org/forum/viewtopic.phtml?t=4163

I'll try to explain off-list (when I have re-discovered how to do
it) as this is not a UTF-8 issue by itself.


Since cups is claimed to be capable of printing UTF-8, [..]


Learning about CUPS is still on my todo list.. have always only
used lpr(ng).


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). 


Didn't work. But the spacing became OK when I tried paps --family
monospace. This may be Debian jargon. But I would not call it
perfect (not really pretty like with ooprint); the right-edge of
the sudoku was "wobbly". Must have something to do with the way
pango selects fonts (which I do not understand at all), it is
anyway not based on something Courier-like but on something
sans-serif.


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)?


A package -- Debian unstable, mined 2000.10-2. There are a lot of
files in /usr/shared/mined which appear to be scripts, none of
which is executable. Maybe it is Debian policy to turn the x bits
off in /usr/shared? None of the files there has "paps" in them
though. Printing (through uniprint) works now, but very
imperfectly; most 'exotic' characters become boxes with hex digits.


Can you please try right-to-left and combining characters? See
the file enclosed.


ooffice / ooprint at first refused to print the file; it hung. It
printed only after I removed _one_ character: the MS-DOS line end
(carriage return). The combining characters were OK, but the
right-side of the boxes was wobbly as if some random spaces had
been inserted or deleted. Wonder if anybody else tried this.

N.B. ooffice cannot, alas, print 'arbitrary' text files; trying to
print a small html source file (even when renamed with extension
.txt) caused a window to appear announcing that Openoffice had
crashed! I don't know why. So not only does it not like MS-DOS
line ends; it also does not like html tags. Not good for a text
printer. The search for a good utf-8 text print system is not yet
over..

Regards, Jan



--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-15 Thread Thomas Wolff
Jan Willem Stumpel wrote:

> Thomas Wolff wrote:
> >> ooffice -p 
> > 
> > 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, s

Re: Text printing with Openoffice

2005-11-14 Thread Jan Willem Stumpel

Thomas Wolff wrote:

ooffice -p 


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:
В

Re: Text printing with Openoffice

2005-11-14 Thread Thomas Wolff
> ooffice -p 
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?

> The user interface does not come up, so it is reasonably fast. The 
> print results are very nice.
> ...
> I called this script ooprint, and can now print arbitrary UTF-8 
> text files by just piping them into ooprint.
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.
* I tried uniprint from the yudit package. It produces nicely looking 
  output but fails on some Unicode features, e.g. combining characters 
  or right-to-left.
* 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...

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.
I'd like to add ooffice as an option if that turns out to work.

Kind regards,
Thomas Wolff

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-14 Thread Vasilis Vasaitis
On Mon, Nov 14, 2005 at 09:51:27AM +0100, Koblinger Egmont wrote:
> On Mon, Nov 14, 2005 at 12:52:23AM +0800, Abel Cheung wrote:
> 
> > On 11/13/05, Koblinger Egmont <[EMAIL PROTECTED]> wrote:
> > > fancy, just the good old fixed-width fonts with 80 columns, but the 
> > > accented
> > > (NFC) letters are okay.
> > 
> > ... While all multibyte characters become junk. (since 2001)
> 
> What do you mean by multibyte characters? Of course all the accented letters
> are multibyte characters in UTF-8. I created several simple text files in
> UTF-8 encoding, containing standard accented letters that are also part of
> latin-1 or latin-2 (e.g. e with acute grave, e with acute accent, o with
> double acute) as well as euro symbol, low-99 and high-99 quote marks etc.,
> sent them to the printer with "lpr filename" (with LANG=hu_HU.UTF-8 and no
> other LC_* variables) and they all got printed correctly.

  I tried printing a simple UTF-8 text file with greek text, and the
result was quite inadequate. It managed to get the simple letters from
the Symbol font (I assume), but the accented letters did not get
printed out at all. The result is both ugly and unreadable for the
most part.

  The OOo method, on the other hand, handled it fine.

> What I didn't test is double-width (cjk) characters, combining symbols,
> non-printable characters, invalid UTF-8 sequences and other similar more
> tricky files. It's easily possible that OOo is better in this respect.


-- 
Vasilis Vasaitis
"A man is well or woe as he thinks himself so."



--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-14 Thread Koblinger Egmont
On Mon, Nov 14, 2005 at 12:52:23AM +0800, Abel Cheung wrote:

> On 11/13/05, Koblinger Egmont <[EMAIL PROTECTED]> wrote:
> > fancy, just the good old fixed-width fonts with 80 columns, but the accented
> > (NFC) letters are okay.
> 
> ... While all multibyte characters become junk. (since 2001)

What do you mean by multibyte characters? Of course all the accented letters
are multibyte characters in UTF-8. I created several simple text files in
UTF-8 encoding, containing standard accented letters that are also part of
latin-1 or latin-2 (e.g. e with acute grave, e with acute accent, o with
double acute) as well as euro symbol, low-99 and high-99 quote marks etc.,
sent them to the printer with "lpr filename" (with LANG=hu_HU.UTF-8 and no
other LC_* variables) and they all got printed correctly.

What I didn't test is double-width (cjk) characters, combining symbols,
non-printable characters, invalid UTF-8 sequences and other similar more
tricky files. It's easily possible that OOo is better in this respect.



-- 
Egmont

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Re: Text printing with Openoffice

2005-11-13 Thread Abel Cheung
On 11/13/05, Koblinger Egmont <[EMAIL PROTECTED]> wrote:
> fancy, just the good old fixed-width fonts with 80 columns, but the accented
> (NFC) letters are okay.

... While all multibyte characters become junk. (since 2001)

Abel

>
>
>
> --
> Egmont
>
> --
> Linux-UTF8:   i18n of Linux on all levels
> Archive:  http://mail.nl.linux.org/linux-utf8/
>
>



--
Abel Cheung   (GPG Key: 0xC67186FF)
Key fingerprint: 671C C7AE EFB5 110C D6D1  41EE 4152 E1F1 C671 86FF

* GNOME Hong Kong - http://www.gnome.hk/
* Opensource Application Knowledge Assoc. - http://oaka.org/


Re: Text printing with Openoffice

2005-11-13 Thread Koblinger Egmont
Hi,

> This may be interesting for list members: Openoffice can be used 
> as a command-line printer for UTF-8 text files. The command is:

I haven't tried it, but a simple "lpr filename" also does a good job using
cups 1.1.23, if lpr is invoked with an UTF-8 locale. It doesn't do anything
fancy, just the good old fixed-width fonts with 80 columns, but the accented
(NFC) letters are okay.



-- 
Egmont

--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/



Text printing with Openoffice

2005-11-12 Thread Jan Willem Stumpel
This may be interesting for list members: Openoffice can be used 
as a command-line printer for UTF-8 text files. The command is:


ooffice -p 

The user interface does not come up, so it is reasonably fast. The 
print results are very nice.


Almost always Openoffice is clever enough to detect that a text 
file is UTF-8; to make certain, you can put the UTF-8 Byte Order 
Mark in front of the file. I did this by means of a script in 
/usr/local/bin:


INFILE=`mktemp /tmp/oopr.XX`
echo -en "\357\273\277" > $INFILE
cat >> $INFILE
ooffice -p $INFILE
rm $INFILE

I called this script ooprint, and can now print arbitrary UTF-8 
text files by just piping them into ooprint.


Regards, Jan


--
Linux-UTF8:   i18n of Linux on all levels
Archive:  http://mail.nl.linux.org/linux-utf8/