Mailing List Archive

Support open source code!


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Printing PostScript



"Piekenbrock Thomas (NMP/Tokyo)" <thomas.piekenbrock@example.com> writes:

> >Jason Katz-Brown <jason@example.com> writes:
> 
> > > I am using KDE 2.2 and can input japanese well, 
> > > and konqy can view it. 
> > > However when i print to a .ps, gv and its friends 
> > > show gibberish instead of 
> > > Japanese.
> > > 
> > > I have looked for the fabled 'psconv' which i suspect 
> > > might help me -- would 
> > > it, if so where can I find it? (a .deb would be super :)
> 
> > You don't need to change anything in the PostScript files, 
> > they should be fine. But of course you need Japanese fonts 
> > for Ghostscript to display them.
> 
> I also need better understanding of this matter.
> Is there no way to embed the font information into the
> ps-file? That would make them portable.

If you have a PostScript file which doesn't have embedded Japanese
fonts but just a reference to a Japanese font, for example a file
like this:

arare-Ryumin-Light-H.ps

Then you can use the "pswrite" output device of Ghostscript 

    ~$ gs -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -sDEVICE=pswrite -sOutputFile=arare-portable.ps arare-Ryumin-Light-H.ps

to create a PostScript file which contains the Japanese characters as
outline graphics. This file is then printable on any PostScript
printer.

> How does Ghostscript get access to all the fonts which are being
> used with X-windows?

It doesn't.

> How does it work with Truetype-Fonts?

It doesn't work for Japanese TrueType fonts out of the box.  There are
patches for Ghostscript 6.51 through which can disguise Asian TrueType
fonts as CID-keyed fonts and then use them the same way as other
CID-keyed fonts. http://www.gyve.org/gs-cjk/.

> And what happens, if the ps-file is converted to pdf by ps2pdf. Can
> Acroread (any OS) show the fonts correctly?

No, but you can achieve that by calling Ghostscript twice. First
create a 'portable' Postscript file using the 'pswrite' device of
Ghostscript like shown above. Then use 'ps2pdf' to convert it to
pdf:

    ~$ ps2pdf arare-portable.ps

ps2pdf also uses Ghostscript, it calls Ghostscript like this:

    ~$ gs -dNOPAUSE -dBATCH -sPAPERSIZE=a4 -sDEVICE=pdfwrite -sOutputFile=arare-portable.pdf arare-portable.ps

The resulting pdf file can be displayed by both Acroread and xpdf. 

-- 
Mike Fabian   <mfabian@example.com>   http://www.suse.de/~mfabian
睡眠不足はいい仕事の敵だ。

Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links