Re: [Debian Woody 3.0r2] Direct japanese text/mozilla printing will fail
On Fri, Jun 04, 2004 at 09:46:09PM +0200, David Kuehling wrote:
> >>>>> "Guillaume" == Guillaume Estival <lonewolf@dspnet.fr.eu.org> writes:
>
> > I've done some various searchs and found out a2psj to convert text
> > files into PostScript files. The resulted PS file will be correctly
> > displayed in gv, but the printing is still "us-ascii" like. And I've
> > never found out why. Searching more and more over the web, I found
> > ps2pdf, which convert a PS file info a PDF one. And loading it through
> > Acrobat reader (Linux version), you can print it and - magic - it
> > works!
>
> If your printer (or printer driver) does not know those fonts, printing
> will fail (it will output ASCII chars, as you described). There is,
> however a simple way around that: Use `gs' as a filter to process your
> postscript file, before sending it to your printer. There is already a
> shell script which manages that: ps2ps. (see man 1 ps2ps). ps2ps will
> embed fonts which are not standard on usual postscript printers into the
> postscript file (you should notice that your file grows very much in
> size). BTW ps2pdf is also driven by `gs', so my solution isn't much
> different from what you did.
>
I've done some test with ps2ps script, which is a better way than
ps2pdf, though.
So I've made a little script:
#!/bin/sh
#Small script to print japanese text on printer.
#Usage: lprj [text file] [-P[printer]]
FILE=`echo $USER`-`date +%s`.ps
a2psj $1 >/tmp/$FILE
ps2ps /tmp/$FILE - |lpr $2
You can optionnaly select the output printer, this might be useful. I
think there is plenty of way to do this far cleaner, if you have some
ideas, just go ahead (wonder if I need to delete temporary file, though)
Through my web search, I've seen the gs system have been altered in
Sarge, so I don't know how it works on Sarge. Is the japanese printing
is easier?
Thank you for all help you provided.
--
Guillaume "LoneWolf" Estival
Powered by Debian GNU/Linux
/* Use free software */
http://dspnet.fr.eu.org/~lonewolf/
Reply to: