/usr/share/ghostscript/lib
NameSizeModeActions
acctest.ps42690644editdlrm
align.ps21560644editdlrm
bj8.rpd6390644editdlrm
bj8gc12f.upp15320644editdlrm
bj8hg12f.upp15310644editdlrm
bj8oh06n.upp15170644editdlrm
bj8pa06n.upp15250644editdlrm
bj8pp12f.upp15420644editdlrm
bj8ts06n.upp15300644editdlrm
bjc610a0.upp15270644editdlrm
bjc610a1.upp15160644editdlrm
bjc610a2.upp15170644editdlrm
bjc610a3.upp15220644editdlrm
bjc610a4.upp15300644editdlrm
bjc610a5.upp15170644editdlrm
bjc610a6.upp15170644editdlrm
bjc610a7.upp15200644editdlrm
bjc610a8.upp15260644editdlrm
bjc610b1.upp15160644editdlrm
bjc610b2.upp15170644editdlrm
bjc610b3.upp15220644editdlrm
bjc610b4.upp15300644editdlrm
bjc610b6.upp15170644editdlrm
bjc610b7.upp15210644editdlrm
bjc610b8.upp15260644editdlrm
bjc6000a1.upp16600644editdlrm
bjc6000b1.upp16600644editdlrm
caption.ps17590644editdlrm
cbjc600.ppd111480644editdlrm
cbjc800.ppd114910644editdlrm
cdj550.upp16900644editdlrm
cdj690.upp19990644editdlrm
cdj690ec.upp20600644editdlrm
cid2code.ps44910644editdlrm
dnj750c.upp28080644editdlrm
dnj750m.upp19750644editdlrm
docie.ps74980644editdlrm
font2pcl.ps184390644editdlrm
ghostpdf.ppd256430644editdlrm
gslp.ps207280644editdlrm
gsnup.ps26340644editdlrm
gs_ce_e.ps22190644editdlrm
gs_css_e.ps49220644editdlrm
gs_il2_e.ps26310644editdlrm
gs_kanji.ps40070644editdlrm
gs_ksb_e.ps31450644editdlrm
gs_l.xbm19450644editdlrm
gs_l.xpm27510644editdlrm
gs_lgo_e.ps27340644editdlrm
gs_lgx_e.ps17660644editdlrm
gs_l_m.xbm19550644editdlrm
gs_m.xbm9450644editdlrm
gs_m.xpm14370644editdlrm
gs_m_m.xbm9550644editdlrm
gs_s.xbm5940644editdlrm
gs_s.xpm9570644editdlrm
gs_s_m.xbm6040644editdlrm
gs_t.xbm3450644editdlrm
gs_t.xpm6050644editdlrm
gs_t_m.xbm3550644editdlrm
gs_wl1_e.ps24950644editdlrm
gs_wl2_e.ps24940644editdlrm
gs_wl5_e.ps25120644editdlrm
ht_ccsto.ps2281430644editdlrm
image-qa.ps730500644editdlrm
jispaper.ps7840644editdlrm
landscap.ps14680644editdlrm
lines.ps37360644editdlrm
mkcidfm.ps223210644editdlrm
necp2x.upp10450644editdlrm
necp2x6.upp10690644editdlrm
pdf2dsc.ps80630644editdlrm
PDFA_def.ps25820644editdlrm
PDFX_def.ps38640644editdlrm
pdf_info.ps151520644editdlrm
pf2afm.ps152950644editdlrm
pfbtopfa.ps9960644editdlrm
PM760p.upp11600644editdlrm
PM760pl.upp11240644editdlrm
PM820p.upp11420644editdlrm
PM820pl.upp11170644editdlrm
ppath.ps18190644editdlrm
pphs.ps68440644editdlrm
prfont.ps72130644editdlrm
printafm.ps48980644editdlrm
ps2ai.ps223060644editdlrm
ps2epsi.ps60700644editdlrm
ras1.upp2150644editdlrm
ras3.upp2140644editdlrm
ras4.upp2200644editdlrm
ras8m.upp2090644editdlrm
ras24.upp2190644editdlrm
ras32.upp1960644editdlrm
rollconv.ps125260644editdlrm
s400a1.upp14540644editdlrm
s400b1.upp16030644editdlrm
sharp.upp19360644editdlrm
sipixa6.upp5290644editdlrm
st640ih.upp22810644editdlrm
st640ihg.upp15080644editdlrm
st640p.upp19140644editdlrm
st640pg.upp11410644editdlrm
st640pl.upp18780644editdlrm
st640plg.upp11050644editdlrm
stc.upp19230644editdlrm
stc2.upp19040644editdlrm
stc2s_h.upp22720644editdlrm
stc2_h.upp18790644editdlrm
stc200_h.upp18480644editdlrm
stc300.upp21360644editdlrm
stc300bl.upp13410644editdlrm
stc300bm.upp14300644editdlrm
stc500p.upp19030644editdlrm
stc500ph.upp19030644editdlrm
stc600ih.upp22810644editdlrm
stc600p.upp11510644editdlrm
stc600pl.upp11150644editdlrm
stc640p.upp10950644editdlrm
Stc670p.upp11590644editdlrm
Stc670pl.upp11240644editdlrm
Stc680p.upp11400644editdlrm
Stc680pl.upp11150644editdlrm
stc740ih.upp21230644editdlrm
Stc740p.upp10390644editdlrm
Stc740pl.upp11150644editdlrm
Stc760p.upp11410644editdlrm
Stc760pl.upp11150644editdlrm
Stc777p.upp11400644editdlrm
Stc777pl.upp11150644editdlrm
stc800ih.upp21580644editdlrm
stc800p.upp11150644editdlrm
stc800pl.upp10970644editdlrm
stc1520h.upp21540644editdlrm
stcany.upp6730644editdlrm
stcany_h.upp6810644editdlrm
stcinfo.ps255170644editdlrm
stcolor.ps50650644editdlrm
stc_h.upp19130644editdlrm
stc_l.upp7340644editdlrm
stocht.ps24940644editdlrm
Stp720p.upp11580644editdlrm
Stp720pl.upp11150644editdlrm
Stp870p.upp11400644editdlrm
Stp870pl.upp11150644editdlrm
traceimg.ps13820644editdlrm
traceop.ps25720644editdlrm
uninfo.ps59860644editdlrm
viewcmyk.ps19840644editdlrm
viewgif.ps53950644editdlrm
viewjpeg.ps56910644editdlrm
viewmiff.ps42530644editdlrm
viewpbm.ps102820644editdlrm
viewpcx.ps52320644editdlrm
viewps2a.ps11360644editdlrm
winmaps.ps36050644editdlrm
zeroline.ps23170644editdlrm
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