Pechat' HTML i PS po russki
Vyderzhki iz perepiski v
Newsgroups: relcom.fido.ru.unix
Pechat' HTML na Epson-printere
From: gen
>>>Mozhno li zastavit' H-ovyj Netscape 2.0 pechatat' grafiku na lazernike bez
>>>podderzhki postskripta ?
Dumayu mozhno, potomu chto iz Netscape 2.0 ya pechatayu na matrichnom Eps LQ-100
bez problem.
Dlya Linux ya delal vot KAK:
1. Ustanovil nescript-1.13++ (vytaskival s ftp'shnika
sunsite.unc.edu/pub/linux/...ne pomnyu..../).
2. Vykinul staryj /etc/printcap i zamenil ego sleduyushchim
# Printcap: to be used with the inclosed filter
# Don't forget to place the filter in /etc and make the /var/spool/lpd/lp
# Directory, and set the lp setting to the proper device.
lp:lp=/dev/lp1:sd=/var/spool/lpd/lp:mx%0:if=/etc/filter:sh
# konec printcap'a
3. I, konechno, kinul v /etc fajl filter sleduyushchego soderzhaniya:
#!/bin/sh
# Set the PRINTER var to a "gs" device.
# Try gs -h for a list of drivers
# You must have nenscript installed to run this.
# vot tut nado glyanut' ghostscript'ovskie ustrojstva ( fajl gs)
PRINTER=eps9high
nenscript -ZB -p- | gs -q -sDEVICE=$PRINTER \
-sPAPERSIZE=letter -dNOPAUSE \
-dSAFER -sOutputFile=- -
# konec filter'a
>>>Delo uslozhnyaetsya tem, chto on podklyuchen na vinyukovskoj tachke v seti.
>>>Prosto ego cherez sambu poboroli, lpr na nego otrabatyvaet tekst, a vot
>>>netskejpa gonit na nego ishodnik na postskripte, vmesto grafiki.
Dolzhen pechatat' teper' kak milen'kij.
Vsyacheskih udovol'stvij !
--------------------- NOTE -------------------------
Moj Netscape ne hochet delat' russkih
PostScript fajlov v koi8 (i dr.), po prichine
HE 8bit'tnosti Nescape'ovskoj konvertilki.
Otsyuda vopros:
KAK preobrazovat' RUSSKUYU HTML v PS ?????????
A esli est' znatoki PERL, to mozhno li byren'ko, ne
vdavayas' v entot yazyk, ispravit' konverter html2ps,
kotoryj u menya est' ????????????????
------------------- END NOTE ------------------------
Pechat' russkogo PS fajla, sgenerennogo Netscape
From: maxim@orgland.ru (Maxim Zotov)
Yura Volodin (yura@fossil.ukrcom.sebastopol.ua) wrote:
> Boris Nazarov (nazarov@cecmow.enet.dec.com) wrote:
> > Problema zhe s Netscape v tom, chto PostScript printery (chashche vsego) ne
> > soderzhat v sebe russkih shriftov. Otsyuda vytekaet reshenie (i im ya uzhe
> > davno
> > pol'zuyus') - vstavit' v sgenerennyj Netscape'om PostScript fajl yavnoe
> > opisanie shriftov.
>
> a mozhno dlya chajnika - kak imenno eto delat' i gde sii opisaniya vzyat'?
>
Sleduyushchie shagi priveli k zhelaemomu rezul'tatu :
1) Berem gde-nibud' KOI-8 shrifty
(naprimer Type 1 c ftp://ftp.kiae.su/pub/misc/fonts/cyrillic/postscript/)
vstavlyaem ih opisanie v ghostscrip'ovskij Fontmap
2) Redaktiruem sgenerennyj Netscape fajl :
V nachale fajla (~39 stroka) Netscape zapisyvaet funkcii perekodirovki :
/F0
/Times-Roman findfont
dup length dict begin
{1 index /FID ne {def} {pop pop} ifelse} forall
/Encoding isolatin1encoding def
currentdict end
definefont pop
/f0 { /F0 findfont exch scalefont setfont } bind def
i tak dalee s fontami f1..f7
Poslednyuyu strochku menyaem na :
/f0 { /TimesKOI findfont exch scalefont setfont } bind def
^^^^^^^^ zdes' imya nuzhnogo KOI-8 fonta
V itoge poluchaem chto-to vrode etogo :
/f0 { /TimesKOI findfont exch scalefont setfont } bind def
/f1 { /TimesKOI-Bold findfont exch scalefont setfont } bind def
/f2 { /TimesKOI-Italic findfont exch scalefont setfont } bind def
/f3 { /TimesKOI-BoldItalic findfont exch scalefont setfont } bind def
/f4 { /CourierKOI findfont exch scalefont setfont } bind def
/f5 { /CourierKOI-Bold findfont exch scalefont setfont } bind def
/f6 { /CourierKOI-Oblique findfont exch scalefont setfont } bind def
/f7 { /CourierKOI-BoldOblique findfont exch scalefont setfont } bind def
Vse!
Mozhno udalit' za nenadobnost'yu tablicu perekodirovki v nachale fajla :
[ /.notdef ....
...
... /ydieresis] /isolatin1encoding exch def
i funkcii perekodirovki
/Fn
....
definefont pop
gde n=0..7
--
http://www.inter-soft.ru/~maxim/ Maxim G. Zotov
Pechat' russkogo PS fajla, sgenerennogo Netscape. II
From: Boris Nazarov.
Maxim Zotov wrote:
> Sleduyushchie shagi priveli k zhelaemomu rezul'tatu :
>
> 1) Berem gde-nibud' KOI-8 shrifty
> (naprimer Type 1 c ftp://ftp.kiae.su/misc/fonts/cyrillic/postscript/)
> vstavlyaem ih opisanie v ghostscrip'ovskij Fontmap
[...]
Po-moemu, esli pravil'no vypolnit' vysheukazannye operacii, to rezul'tat
budet takoj: gs i "ego kompaniya" dejstvitel'no budut pokazyvat' dokument
s russkimi shriftami. No, esli vy zahotite ego napechatat', to printer,
estestvenno, ne najdet shrift, kotorym vy hotite vospol'zovat'sya
(TimesKOI etc).
Znachit, vozmozhny dva resheniya etoj problemy:
1 vklyuchit' opisanie shrifta _pryamo_v_dokument_ (dostupno vsem
pol'zovatelyam);
2 zagruzit' shrift v printer i ispravit' v dokumente tol'ko ssylku na
shrift (pri etom, zagruzku shrifta mozhet vypolnit' tol'ko administrator
printera).
Esli vy zahotite vospol'zovat'sya pervym sposobom, to vot reshenie:
(by original solution provider ;-)
1. "Otcepite" ot pis'ma opisanie russkih shriftov.
2. Dobav'te ego v fajl, sgenerennyj NetScape pered "magicheskoj"
strochkoj '/rhc'.
Vot sobstvenno i vse.
Krome togo, etot fajl mozhno ispol'zovat' dlya pechati lyubogo dokumenta,
ispol'zuyushchego shrifty Times i Courier (prosto pricepite ego pered
fajlom).
No, *vnimanie*, ne vse tak prosto, kak eto moglo by pokazat'sya.
Poskol'ku
ya ne smog najti v razumnoe vremya russkie Times i Courier (a tashchit' ih u
MicroSoft dostatochno dolgo - nado ved' i kogda-nibud' rabotat'), ya
ispol'zoval
drugie shrifty (a imenno, Academy i Magazine). Oni obladayut drugoj
metrikoj,
i, bolee togo, ni odin iz nih ne monoshirinnyj kak Courier. Rezul'tat ne
zamedlil sebya zhdat' - nekotorye dokumenty mogut ne vlezayut na list.
Togda
prihoditsya "podkruchivat'" razmer shriftov rukami.
1. Nahodite strochku
/f0 { /F0 findfont exch scalefont setfont } bind def
i dobavlyaete
/f0 { /F0 findfont exch 1 sub scalefont setfont } bind def
~~~~~
prichem, chem bol'she chislo, tem men'she budet ispol'zovan shrift.
Estestvenno, eto nado prodelat' so vsemi takimi strochkami (f0-f7).
f0-f3 "otvechayut" sa odin font, f4-f7 za drugoj.
Regards,
Boris Nazarov.
Last-modified: Fri, 01 Aug 1997 20:19:47 GMT