/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/pdf2dsc.ps (8063B)
% 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. % % pdf2dsc.ps % read pdf file and produce DSC "index" file. % % Input file is named PDFname % Output file is named DSCname % % Run using: % gs -dNODISPLAY -sPDFname=pdffilename -sDSCname=tempfilename pdf2dsc.ps % Then display the PDF file with % gs tempfilename % % Modified by Jason McCarty, bug 688071 % Add PageLabels support. % Modified by Geoff Keating 21/12/98: % Add DocumentMedia, PageMedia comments % Use inherited BoundingBox and Orientation % Reformat, add new macro 'puts', generally clean up % Modified by Johannes Plass 1996-11-05: % Adds BoundingBox and Orientation if available. % Modified by rjl/lpd 9/19/96 % Updates for compatibility with modified pdf_*.ps code for handling % page ranges (i.e., partial files) better. % Modified by Geoff Keating 7/3/96: % include Title and CreationDate DSC comments (these are displayed by % Ghostview); % reduce the size of typical output files by a factor of about 3. % Modified by L. Peter Deutsch 3/18/96: % Removes unnecessary and error-prone code duplicated from pdf_main.ps % Modified by L. Peter Deutsch for GS 3.33 % Originally by Russell Lang 1995-04-26 /PDFfile PDFname (r) file def /DSCfile DSCname (w) file def systemdict /.setsafe known { .setsafe } if /puts { DSCfile exch writestring } bind def /DSCstring 255 string def /MediaTypes 10 dict def PDFfile runpdfbegin /FirstPage where { pop } { /FirstPage 1 def } ifelse /LastPage where { pop } { /LastPage pdfpagecount def } ifelse % scan through for media sizes, keep them in the dictionary FirstPage 1 LastPage { pdfgetpage /MediaBox pget pop % MediaBox is a required attribute aload pop 3 -1 roll sub 3 1 roll exch sub exch 2 array astore aload 3 1 roll 10 string cvs exch 10 string cvs (x) 3 -1 roll concatstrings concatstrings cvn MediaTypes 3 1 roll exch put } for % write header and prolog (%!PS-Adobe-3.0\n) puts Trailer /Info knownoget { dup /Title knownoget { (%%Title: ) puts DSCfile exch write== } if /CreationDate knownoget { (%%CreationDate: ) puts DSCfile exch write== } if } if % This is really supposed to be sorted by frequency of usage... (%%DocumentMedia: ) MediaTypes { exch pop 1 index puts (y) puts dup 1 get DSCstring cvs puts (x) puts dup 0 get DSCstring cvs puts ( ) puts dup 0 get DSCstring cvs puts ( ) puts 1 get DSCstring cvs puts ( 70 white ()\n) puts pop (%%+ ) } forall pop (%%Pages: ) puts LastPage FirstPage sub 1 add DSCstring cvs puts (\n%%EndComments\n) puts (%%BeginProlog\n) puts (/Page null def\n/Page# 0 def\n/PDFSave null def\n) puts (/DSCPageCount 0 def\n) puts (/DoPDFPage {dup /Page# exch store dup dopdfpages } def\n) puts (%%EndProlog\n) puts (%%BeginSetup\n) puts DSCfile PDFname write==only ( \(r\) file { DELAYSAFER { .setsafe } if } stopped pop\n) puts ( runpdfbegin\n) puts ( process_trailer_attrs\n) puts (%%EndSetup\n) puts /.hasPageLabels false def % see "Page Labels" in the PDF Reference Trailer /Root knownoget { /PageLabels knownoget { /PageLabels exch def /.pageCounter 1 def /.pageCounterType /D def /.pagePrefix () def % (TEXT) .ToLower (text) -- convert text to lowercase -- only letters! /.ToLower { dup length 1 sub -1 0 { 1 index exch 2 copy get 2#00100000 or put } for } def % int .CvAlpha (int in alphabetic base 26) -- convert a positive % integer to base 26 in capital letters, with 1=A; i.e. A..Z, AA..AZ, ... /.CvAlpha { % using cvrs seems futile since this isn't zero-based ... [ exch % construct an array of ASCII values, in reverse { % the remainder stays on the top of stack dup 0 eq { pop exit } if % quit if the value is zero dup 26 mod dup 0 eq { 26 add } if % so that the division is correct dup 64 add 3 1 roll sub 26 idiv % save the ASCII value and iterate } loop ] dup length dup string 3 1 roll dup -1 1 { % put the letters in a string 4 copy sub exch 4 -1 roll 1 sub get put } for pop pop } def % int .CvRoman (int in capital Roman numerals) % convert a positive integer to capital Roman numerals % return a decimal string if >= 4000 /.CvRoman { dup DSCstring cvs % start with the decimal representation exch 4000 lt { % convert only if Roman numerals can represent this dup length [ [ () (I) (II) (III) (IV) (V) (VI) (VII) (VIII) (IX) ] [ () (X) (XX) (XXX) (XL) (L) (LX) (LXX) (LXXX) (XC) ] [ () (C) (CC) (CCC) (CD) (D) (DC) (DCC) (DCCC) (CM) ] [ () (M) (MM) (MMM) ] ] % Roman equivalents () % append the Roman equivalent of each decimal digit to this string 2 index -1 1 { 2 index 1 index 1 sub get 5 index 5 index 4 -1 roll sub get 48 sub get concatstrings } for 4 1 roll pop pop pop } if } def /PageToString << /D { DSCstring cvs } /R { .CvRoman } /r { .CvRoman .ToLower } /A { .CvAlpha } /a { .CvAlpha .ToLower } >> def /.hasPageLabels true def } if } if % process each page FirstPage 1 LastPage { (%%Page: ) puts .hasPageLabels { dup 1 sub PageLabels exch numoget dup null ne { % page labels changed at this page, reset the values dup /S known { dup /S get } { null } ifelse /.pageCounterType exch def dup /P known { dup /P get } { () } ifelse /.pagePrefix exch def dup /St known { /St get } { pop 1 } ifelse /.pageCounter exch def } { pop } ifelse % output the page label (\() .pagePrefix .pageCounterType //null ne dup { PageToString .pageCounterType known and } if { % format the page number .pageCounter dup 0 gt { % don't try to format nonpositive numbers PageToString .pageCounterType get exec } { DSCstring cvs } ifelse } { () } ifelse (\)) concatstrings concatstrings concatstrings puts /.pageCounter .pageCounter 1 add def } { dup DSCstring cvs puts } ifelse ( ) puts dup DSCstring cvs puts (\n) puts dup pdfgetpage dup /MediaBox pget pop (%%PageMedia: y) puts aload pop 3 -1 roll sub DSCstring cvs puts (x) puts exch sub DSCstring cvs puts (\n) puts dup /CropBox pget { (%%PageBoundingBox: ) puts {DSCfile exch write=only ( ) puts} forall (\n) puts } if /Rotate pget { (%%PageOrientation: ) puts 90 div cvi 4 mod dup 0 lt {4 add} if [(Portrait) (Landscape) (UpsideDown) (Seascape)] exch get puts (\n) puts } if DSCfile exch DSCstring cvs writestring ( DoPDFPage\n) puts } for runpdfend % write trailer (%%Trailer\n) puts (runpdfend\n) puts (%%EOF\n) puts % close output file and exit DSCfile closefile quit % end of pdf2dsc.ps