Mailing List Archive

Support open source code!


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

tlug: txt/html to gif/jpeg?



>>>>> "Tony" == Tony Laszlo <laszlo@example.com> writes:

    Tony> Is there an easy way of converting a Japanese document (text
    Tony> or html) to something (gif/jpeg?) that would be readable by
    Tony> someone who doesn't have a Japanese-capable environment (I
    Tony> suspect the recipient has a Mac that doesn't do Japanese).

Jeff Friedl had a tool for text on his Omron server back in the
Hanshin Daishinsai days; if you poke around
ftp.cc.monash.edu.au:/pub/nihongo, you might find it there.  Just
requires perl and a Japanese BDF (X font source) as I recall.

A vflib-enabled ghostscript with the png* or jpeg* drivers will do
this for you, too, but you may have a problem with the gslp utility
which AFAIK only handles iso-8859-1 fonts.

You could take your text file, wrap it in

\documentstyle[12pt,a4paper]{article}

\begin{document}
\begin{verbatim}

% your text goes here

\end{verbatim}
\end{document}

run it through platex and then dvips and then gs.  To find out if you
have the png/jpeg drivers, use `gs --help | egrep 'png|jpeg''.  You
can't trust the GIF driver; the one supplied with Ghostscript does not
do compression because of the Unisys patent (although you might not
care if your correspondent has a lot of memory and you can send it
compressed with gzip or stuffit or something).

Unless the Mac software is very old, it will be able to read PNG so
that's what I recommend.  JPEG is not designed for high-contrast
images, I don't recommend it unless you're willing to use much higher
resolution.

HTML would be harder, although you could do netscape -> file.ps -> gs.

Once you have Postscript, the Ghostscript command is something like:

	  gs -sDEVICE=pngmono -sOutputFile=file.png file.ps

-- 
University of Tsukuba                Tennodai 1-1-1 Tsukuba 305-8573 JAPAN
Institute of Policy and Planning Sciences       Tel/fax: +81 (298) 53-5091
_________________  _________________  _________________  _________________
What are those straight lines for?  "XEmacs rules."
-------------------------------------------------------------------
Next Technical Meeting: January 14 (Fri) 19:00
* Topic: "glibc - current status and future developments"
* Guest Speaker: Ulrich Drepper (Cygnus Solutions)
* Place: Oracle Japan HQ 12F Seminar Room (New Otani Garden Court)
-------------------------------------------------------------------
more info: http://www.tlug.gr.jp        Sponsor: Global Online Japan


Home | Main Index | Thread Index

Home Page Mailing List Linux and Japan TLUG Members Links