/
usr
/
share
/
ghostscript
/
lib
/
/usr/share/ghostscript/lib
mkdir
upload
Name
Size
Mode
Actions
acctest.ps
4269
0644
edit
dl
rm
align.ps
2156
0644
edit
dl
rm
bj8.rpd
639
0644
edit
dl
rm
bj8gc12f.upp
1532
0644
edit
dl
rm
bj8hg12f.upp
1531
0644
edit
dl
rm
bj8oh06n.upp
1517
0644
edit
dl
rm
bj8pa06n.upp
1525
0644
edit
dl
rm
bj8pp12f.upp
1542
0644
edit
dl
rm
bj8ts06n.upp
1530
0644
edit
dl
rm
bjc610a0.upp
1527
0644
edit
dl
rm
bjc610a1.upp
1516
0644
edit
dl
rm
bjc610a2.upp
1517
0644
edit
dl
rm
bjc610a3.upp
1522
0644
edit
dl
rm
bjc610a4.upp
1530
0644
edit
dl
rm
bjc610a5.upp
1517
0644
edit
dl
rm
bjc610a6.upp
1517
0644
edit
dl
rm
bjc610a7.upp
1520
0644
edit
dl
rm
bjc610a8.upp
1526
0644
edit
dl
rm
bjc610b1.upp
1516
0644
edit
dl
rm
bjc610b2.upp
1517
0644
edit
dl
rm
bjc610b3.upp
1522
0644
edit
dl
rm
bjc610b4.upp
1530
0644
edit
dl
rm
bjc610b6.upp
1517
0644
edit
dl
rm
bjc610b7.upp
1521
0644
edit
dl
rm
bjc610b8.upp
1526
0644
edit
dl
rm
bjc6000a1.upp
1660
0644
edit
dl
rm
bjc6000b1.upp
1660
0644
edit
dl
rm
caption.ps
1759
0644
edit
dl
rm
cbjc600.ppd
11148
0644
edit
dl
rm
cbjc800.ppd
11491
0644
edit
dl
rm
cdj550.upp
1690
0644
edit
dl
rm
cdj690.upp
1999
0644
edit
dl
rm
cdj690ec.upp
2060
0644
edit
dl
rm
cid2code.ps
4491
0644
edit
dl
rm
dnj750c.upp
2808
0644
edit
dl
rm
dnj750m.upp
1975
0644
edit
dl
rm
docie.ps
7498
0644
edit
dl
rm
font2pcl.ps
18439
0644
edit
dl
rm
ghostpdf.ppd
25643
0644
edit
dl
rm
gslp.ps
20728
0644
edit
dl
rm
gsnup.ps
2634
0644
edit
dl
rm
gs_ce_e.ps
2219
0644
edit
dl
rm
gs_css_e.ps
4922
0644
edit
dl
rm
gs_il2_e.ps
2631
0644
edit
dl
rm
gs_kanji.ps
4007
0644
edit
dl
rm
gs_ksb_e.ps
3145
0644
edit
dl
rm
gs_l.xbm
1945
0644
edit
dl
rm
gs_l.xpm
2751
0644
edit
dl
rm
gs_lgo_e.ps
2734
0644
edit
dl
rm
gs_lgx_e.ps
1766
0644
edit
dl
rm
gs_l_m.xbm
1955
0644
edit
dl
rm
gs_m.xbm
945
0644
edit
dl
rm
gs_m.xpm
1437
0644
edit
dl
rm
gs_m_m.xbm
955
0644
edit
dl
rm
gs_s.xbm
594
0644
edit
dl
rm
gs_s.xpm
957
0644
edit
dl
rm
gs_s_m.xbm
604
0644
edit
dl
rm
gs_t.xbm
345
0644
edit
dl
rm
gs_t.xpm
605
0644
edit
dl
rm
gs_t_m.xbm
355
0644
edit
dl
rm
gs_wl1_e.ps
2495
0644
edit
dl
rm
gs_wl2_e.ps
2494
0644
edit
dl
rm
gs_wl5_e.ps
2512
0644
edit
dl
rm
ht_ccsto.ps
228143
0644
edit
dl
rm
image-qa.ps
73050
0644
edit
dl
rm
jispaper.ps
784
0644
edit
dl
rm
landscap.ps
1468
0644
edit
dl
rm
lines.ps
3736
0644
edit
dl
rm
mkcidfm.ps
22321
0644
edit
dl
rm
necp2x.upp
1045
0644
edit
dl
rm
necp2x6.upp
1069
0644
edit
dl
rm
pdf2dsc.ps
8063
0644
edit
dl
rm
PDFA_def.ps
2582
0644
edit
dl
rm
PDFX_def.ps
3864
0644
edit
dl
rm
pdf_info.ps
15152
0644
edit
dl
rm
pf2afm.ps
15295
0644
edit
dl
rm
pfbtopfa.ps
996
0644
edit
dl
rm
PM760p.upp
1160
0644
edit
dl
rm
PM760pl.upp
1124
0644
edit
dl
rm
PM820p.upp
1142
0644
edit
dl
rm
PM820pl.upp
1117
0644
edit
dl
rm
ppath.ps
1819
0644
edit
dl
rm
pphs.ps
6844
0644
edit
dl
rm
prfont.ps
7213
0644
edit
dl
rm
printafm.ps
4898
0644
edit
dl
rm
ps2ai.ps
22306
0644
edit
dl
rm
ps2epsi.ps
6070
0644
edit
dl
rm
ras1.upp
215
0644
edit
dl
rm
ras3.upp
214
0644
edit
dl
rm
ras4.upp
220
0644
edit
dl
rm
ras8m.upp
209
0644
edit
dl
rm
ras24.upp
219
0644
edit
dl
rm
ras32.upp
196
0644
edit
dl
rm
rollconv.ps
12526
0644
edit
dl
rm
s400a1.upp
1454
0644
edit
dl
rm
s400b1.upp
1603
0644
edit
dl
rm
sharp.upp
1936
0644
edit
dl
rm
sipixa6.upp
529
0644
edit
dl
rm
st640ih.upp
2281
0644
edit
dl
rm
st640ihg.upp
1508
0644
edit
dl
rm
st640p.upp
1914
0644
edit
dl
rm
st640pg.upp
1141
0644
edit
dl
rm
st640pl.upp
1878
0644
edit
dl
rm
st640plg.upp
1105
0644
edit
dl
rm
stc.upp
1923
0644
edit
dl
rm
stc2.upp
1904
0644
edit
dl
rm
stc2s_h.upp
2272
0644
edit
dl
rm
stc2_h.upp
1879
0644
edit
dl
rm
stc200_h.upp
1848
0644
edit
dl
rm
stc300.upp
2136
0644
edit
dl
rm
stc300bl.upp
1341
0644
edit
dl
rm
stc300bm.upp
1430
0644
edit
dl
rm
stc500p.upp
1903
0644
edit
dl
rm
stc500ph.upp
1903
0644
edit
dl
rm
stc600ih.upp
2281
0644
edit
dl
rm
stc600p.upp
1151
0644
edit
dl
rm
stc600pl.upp
1115
0644
edit
dl
rm
stc640p.upp
1095
0644
edit
dl
rm
Stc670p.upp
1159
0644
edit
dl
rm
Stc670pl.upp
1124
0644
edit
dl
rm
Stc680p.upp
1140
0644
edit
dl
rm
Stc680pl.upp
1115
0644
edit
dl
rm
stc740ih.upp
2123
0644
edit
dl
rm
Stc740p.upp
1039
0644
edit
dl
rm
Stc740pl.upp
1115
0644
edit
dl
rm
Stc760p.upp
1141
0644
edit
dl
rm
Stc760pl.upp
1115
0644
edit
dl
rm
Stc777p.upp
1140
0644
edit
dl
rm
Stc777pl.upp
1115
0644
edit
dl
rm
stc800ih.upp
2158
0644
edit
dl
rm
stc800p.upp
1115
0644
edit
dl
rm
stc800pl.upp
1097
0644
edit
dl
rm
stc1520h.upp
2154
0644
edit
dl
rm
stcany.upp
673
0644
edit
dl
rm
stcany_h.upp
681
0644
edit
dl
rm
stcinfo.ps
25517
0644
edit
dl
rm
stcolor.ps
5065
0644
edit
dl
rm
stc_h.upp
1913
0644
edit
dl
rm
stc_l.upp
734
0644
edit
dl
rm
stocht.ps
2494
0644
edit
dl
rm
Stp720p.upp
1158
0644
edit
dl
rm
Stp720pl.upp
1115
0644
edit
dl
rm
Stp870p.upp
1140
0644
edit
dl
rm
Stp870pl.upp
1115
0644
edit
dl
rm
traceimg.ps
1382
0644
edit
dl
rm
traceop.ps
2572
0644
edit
dl
rm
uninfo.ps
5986
0644
edit
dl
rm
viewcmyk.ps
1984
0644
edit
dl
rm
viewgif.ps
5395
0644
edit
dl
rm
viewjpeg.ps
5691
0644
edit
dl
rm
viewmiff.ps
4253
0644
edit
dl
rm
viewpbm.ps
10282
0644
edit
dl
rm
viewpcx.ps
5232
0644
edit
dl
rm
viewps2a.ps
1136
0644
edit
dl
rm
winmaps.ps
3605
0644
edit
dl
rm
zeroline.ps
2317
0644
edit
dl
rm
Edit:
/usr/share/ghostscript/lib/ps2epsi.ps
(6070B)
% Copyright (C) 2001-2021 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or % implied. % % This software is distributed under license and may not be copied, % modified or distributed except as expressly authorized under the terms % of the license contained in the file LICENSE in this distribution. % % Refer to licensing information at http://www.artifex.com or contact % Artifex Software, Inc., 1305 Grant Avenue - Suite 200, Novato, % CA 94945, U.S.A., +1(415)492-9861, for further information. % Convert a PostScript file to an EPSI file, adding the Preview Image. % If the file is already EPSF, then skip the creation of an EPSF, and % only add the preview. A warning is issued if the %%Pages: comment % indicates that there is more than a single page in the input file. % Expected invocation: % gs -q -dNOOUTERSAVE -dNODISPLAY -dLastPage=1 -sOutputFile=out.epsi --permit-file-read=in.ps -- ps2epsi.ps in.ps % Usually this will be invoked by the ps2epsi script (or .bat or .cmd versions) false % no errors from initial param check % NOOUTERSAVE is needed for the SAVE to not remove the tempfile (if one was needed) vmstatus pop pop 0 gt { (Error: missing -dNOOUTERSAVE option) = pop true } if % NODISPLAY may not be strictly needed, but we don't want to open the default device /NODISPLAY where { pop } { (Error: missing -dNODISPLAY option) = pop true } ifelse % LastPage is needed if we are using eps2write on a PostScript (or PDF) file that has multiple pages. /LastPage where { pop } { (Error: missing -dLastPage option) = pop true } ifelse % OutputFile is needed so that it gets on the permit-file-writing list /OutputFile where { pop } { (Error: missing -sOutputFile option) = pop true } ifelse .shellarguments not count 3 lt or count -1 roll or { (usage: gs -q -dNOOUTERSAVE -dNODISPLAY -dLastPage=1 -sOutputFile=out.epsi --permit-file-read=in.eps -- ps2epsi.ps in.ps) = quit } { dup /InputFile exch def (r) file /I exch def } ifelse /O OutputFile (w) file def /S 65535 string def /R { I S readline not { (Error: Unexpected end of file.) = quit } if } bind def /WL { O exch writestring O (\n) writestring } bind def % Write with linefeed /TName null def /EPSFheader (%!PS-Adobe-3.0 EPSF-3.0) def % Read the header to check if this file was EPSF R dup EPSFheader ne { % InputFile was not EPSF pop % discard the first line of the InputFile % run the file through eps2write (into a tempfile) to make an EPSF (_ps2epsi) (w+) .tempfile closefile /TName exch def /SAVE save def (eps2write) finddevice mark /OutputFile TName 3 index putdeviceprops pop setdevice InputFile run SAVE restore /I TName (r) file def R } if WL % Write the first line (either from InputFile or the tempfile % From the "5002 Encapsulated PostScript File Format Specification Version 3.0 1 May 1992" % The preview section must appear after the header comment section, but % before the document prologue definitions. That is, it should immediately % follow the %%EndComments: line in the EPS file. { % loop until we see the %%EndComments line, writing those lines to output R dup (%%EndComments) anchorsearch exch pop { % discard the match or extra copy of the string pop exit % found it } if % Check the %%Pages: comment to issue a warning if there is more than one page. dup (%%Pages:) anchorsearch exch pop { % discard the match or extra copy of the string cvi 1 gt { (Warning: EPSI files can only have 1 page, Only the first page will be in the preview.) = } if } if % Collect the BoundingBox data that will be used when generating the preview dup (%%BoundingBox:) anchorsearch exch pop { % discard the match or extra copy of the string mark exch token not { (Error: invalid BoundingBox parameters) = quit } if exch token not { (Error: invalid BoundingBox parameters) = quit } if exch token not { (Error: invalid BoundingBox parameters) = quit } if exch token not { (Error: invalid BoundingBox parameters) = quit } if exch pop ] /BBox exch def % Preview dimensions /PWidth BBox dup 2 get exch 0 get sub def /PHeight BBox dup 3 get exch 1 get sub def } if WL % send to output file with linefeed. } loop WL % send to output file with linefeed. % If the InputFile already has a preview, skip past it R dup (%%BeginPreview) anchorsearch exch pop { % discard the match or extra copy of the string pop % Read lines until after the %%EndPreview { R (%%EndPreview) anchorsearch exch pop { % discard the match or extra copy of the string pop pop exit % found it } if } loop % Get the next line for use after the generated preview R } if /LineAfterEndComments exch def //null (w+) .tempfile closefile % will be opened by bit device /Pname exch def (bit) selectdevice << /GrayValues 256 % Gray, not monochrome /OutputFile Pname /TextAlphaBits 4 /GraphicsAlphaBits 4 /LastPage 1 % TBD: does this work? /.IgnoreNumCopies true /Install { BBox 0 get neg BBox 1 get neg translate { 1.0 exch sub } settransfer } % EPSI 00 is white /HWResolution [ 72. 72. ] /PageSize [ PWidth PHeight ] >> setpagedevice InputFile run /P Pname (r) file def % Preview data file /SP PWidth string def % One string per image line % Write the preview O (%%BeginPreview: ) writestring O PWidth write==only O ( ) writestring O PHeight write==only O ( 8 ) writestring O PHeight PWidth 39 add 40 idiv mul write== % 40 bytes per line O flushfile 0 1 PHeight 1 sub { pop P SP readstring pop 0 40 PWidth { O (% ) writestring % 82 bytes on each line, plus EOL SP exch 40 PWidth 2 index sub .min getinterval O exch writehexstring O (\n) writestring } for pop } for (%%EndPreview) WL % Write the line that followed the %%EndComments LineAfterEndComments WL % Copy the remainder of the inputfile { I S readstring exch O exch writestring not { exit } if } loop % If we created a tempfile, delete it TName null ne { TName deletefile } if quit
Save
cmd:
run