/
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/pdf_info.ps
(15152B)
%!PS % 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. % % % $Id: pdf_info.ps 6300 2005-12-28 19:56:24Z alexcher $ % Dump some info from a PDF file % usage: gs -dNODISPLAY -q -sFile=____.pdf [-dDumpMediaSizes=false] [-dDumpFontsNeeded=false] [-dDumpXML] % [-dDumpFontsUsed [-dShowEmbeddedFonts] ] lib/pdf_info.ps 128 dict begin /QUIET true def % in case they forgot /showoptions { ( where "options" are:) = ( -dDumpMediaSizes=false (default true) MediaBox and CropBox for each page) = ( -dDumpFontsNeeded=false (default true)Fonts used, but not embedded) = ( -dDumpXML print the XML Metadata from the PDF, if present) = ( -dDumpFontsUsed List all fonts used) = ( -dShowEmbeddedFonts only meaningful with -dDumpFontsUsed) = (\n If no options are given, the default is -dDumpMediaSizes -dDumpFontsNeeded) = () = flush } bind def /DumpMediaSizes where { pop } { /DumpMediaSizes true def } ifelse /DumpFontsNeeded where { pop } { /DumpFontsNeeded true def } ifelse [ {.shellarguments} stopped not { { counttomark 1 eq { dup 0 get (-) 0 get ne { % File specified on the command line using: -- lib/pdf_info.ps infile.pdf /File exch def false % don't show usage } { true % show usage and quit } ifelse } { true } ifelse { (\n*** Usage: gs [options] -- lib/pdf_info.ps infile.pdf ***\n\n) print showoptions quit } if } if } if /File where not { (\n *** Missing input file name \(use -sFile=____.pdf\)\n) = ( usage: gs -dNODISPLAY -q -sFile=____.pdf [ options ] lib/pdf_info.ps\n) = showoptions quit } if cleartomark % discard the dict from --where-- % ---- No more executable code on the top level after this line ----- % ---- except 2 lines at the very end ----- % Write a character to the standard output. /putchar [ % int -> - (%stdout) (w) file /exch cvx /write cvx ] cvx bind def % Write U+xxxx to the standard output as UTF-8. /put-ucode { % int -> - dup 16#80 ge { dup 16#800 ge { dup 16#10000 ge { dup -18 bitshift 16#f0 or putchar dup -12 bitshift 16#3f and 16#80 or putchar } { dup -12 bitshift 16#e0 or putchar } ifelse dup -6 bitshift 16#3f and 16#80 or putchar } { dup -6 bitshift 16#C0 or putchar } ifelse 16#3f and 16#80 or } if putchar } bind def % PDFDocEncoding to U+xxxx decoding table. /doc-to-ucode [ 0 1 23 {} for 16#2d8 16#2c7 16#2c6 16#2d9 16#2dd 16#2db 16#2da 16#2dc 32 1 127 {} for 16#2022 16#2020 16#2021 16#2026 16#2014 16#2013 16#192 16#2044 16#2039 16#203a 16#2212 16#2030 16#201e 16#201c 16#201d 16#2018 16#2019 16#201a 16#2122 16#fb01 16#fb02 16#141 16#152 16#160 16#178 16#17d 16#131 16#142 16#153 16#161 16#17e 0 16#20ac 161 1 255 {} for ] readonly def % Convert a doc string from PDFDocEncoding or UTF-16BE to UTF-8 % and write it to standard output. /write-doc-string { % (string) -> - 1024 string cvs <feff> anchorsearch { pop 0 exch % hi16 (str) 0 2 2 index length 2 sub { 2 copy 2 copy % hi16 (str) i (str) i (str) i get 256 mul 3 1 roll % hi16 (str) i hi*256 (str) i 1 add get add % hi16 (str) i 256*hi+lo dup 16#fc00 and dup % hi16 (str) i 256*hi+lo tag tag 16#d800 eq { % High surrogate pop 16#3ff and 10 bitshift 16#10000 add % hi16 (str) i hi16' 4 1 roll % hi16' hi16 (str) i pop exch pop % hi16' (str) } { 16#dc00 eq { % Low surrogate 16#3ff and % hi16 (str) i (256*hi+lo)&0x3ff 4 -1 roll add % (str) i (256*hi+lo)&0x3ff+hi16 put-ucode % (str) i pop 0 exch % 0 (str) } { % BMP plane put-ucode % hi16 (str) i pop % hi16 (str) } ifelse } ifelse } for pop pop % - } { { //doc-to-ucode exch get put-ucode } forall } ifelse } bind def %% When checking Resources for Font objects, we must ensure that we don't end %% up following a circular reference. Circular references in Resources should %% not, of course, be present but we've seen a number of cases. If we do detect %% a circular reference, then stop checking that chain. /oforce_no_circular { dup type /packedarraytype eq { dup 0 get currentdict /ProcessedResources known { dup ProcessedResources exch known { pop pop //null } { dup ProcessedResources 3 1 roll put oforce } ifelse } { oforce } ifelse } { oforce } ifelse } bind def /dump-pdf-info { % (fname) -> - () = ( ) print print ( has ) print PDFPageCount dup =print 10 mod 1 eq { ( page.\n) } { ( pages\n) } ifelse = flush Trailer /Root oget /AcroForm knownoget { /XFA knownoget { (File uses XFA forms.\n\n) print pop } if } if /DumpXML where { pop Trailer /Root oget /Metadata knownoget { //false resolvestream { dup 256 string readstring exch print not { exit } if } loop pop % done with the stream (\n_____________________________________________________________) = flush } if } if % Print out the "Info" dictionary if present Trailer /Info knownoget { dup /Title knownoget { (Title: ) print write-doc-string () = flush } if dup /Author knownoget { (Author: ) print write-doc-string () = flush } if dup /Subject knownoget { (Subject: ) print write-doc-string () = flush } if dup /Keywords knownoget { (Keywords: ) print write-doc-string () = flush } if dup /Creator knownoget { (Creator: ) print write-doc-string () = flush } if dup /Producer knownoget { (Producer: ) print write-doc-string () = flush } if dup /CreationDate knownoget { (CreationDate: ) print write-doc-string () = flush } if dup /ModDate knownoget { (ModDate: ) print write-doc-string () = flush } if dup /Trapped knownoget { (Trapped: ) print write-doc-string () = flush } if pop } if } bind def % <page index> <page dict> dump-media-sizes - /dump-media-sizes { DumpMediaSizes { () = % Print out the Page Size info for each page. (Page ) print =print dup /UserUnit pget { ( UserUnit: ) print =print } if dup /MediaBox pget { ( MediaBox: ) print oforce_array ==only } if dup /CropBox pget { ( CropBox: ) print oforce_array ==only } if dup /BleedBox pget { ( BleedBox: ) print oforce_array ==only } if dup /TrimBox pget { ( TrimBox: ) print oforce_array ==only } if dup /ArtBox pget { ( ArtBox: ) print oforce_array ==only } if dup /Rotate pget { ( Rotate = ) print =print } if dup /Annots pget { pop ( Page contains Annotations) print } if dup pageusestransparency { ( Page uses transparency features) print } if dup pagespotcolors dup length 0 gt { (\n Page Spot colors: ) = << /Black 0 /Cyan 0 /Magenta 0 /Yellow 0 >> exch { pop % discard the value 1 index 1 index known not { % check if colorant is a standard one ( ) print (') print =print (') = } { pop % ignore this standard colorant } ifelse } forall pop % discard dict of standard colorants } { pop } ifelse pop % done with pagedict () = flush } { pop pop } ifelse } bind def % List of standard font names for use when we are showing the FontsNeeded /StdFontNames [ /Times-Roman /Helvetica /Courier /Symbol /Times-Bold /Helvetica-Bold /Courier-Bold /ZapfDingbats /Times-Italic /Helvetica-Oblique /Courier-Oblique /Times-BoldItalic /Helvetica-BoldOblique /Courier-BoldOblique ] def /res-type-dict 10 dict begin /Font { { exch pop oforce_no_circular dup //null ne { dup /DescendantFonts knownoget { exch pop 0 get oforce_no_circular %% Check to see if a potentail circular reference was detected. This could be a %% false positive caused by other fonts using the same DescendantFont(s), but if %% so then we've already cehcked them anyway. dup //null eq { pop << >>} if } if dup /FontDescriptor knownoget { dup /FontFile known 1 index /FontFile2 known or exch /FontFile3 known or /ShowEmbeddedFonts where { pop pop //false } if { pop % skip embedded fonts } { /BaseFont knownoget { % not embedded 2 index exch //null put } if } ifelse } { /BaseFont knownoget { % no FontDescriptor, not embedded 2 index exch //null put } if } ifelse } { pop } ifelse } forall % traverse the dictionary } bind def /XObject { { exch pop oforce_no_circular dup //null ne { dup /Subtype knownoget { /Form eq { /Resources knownoget { get-fonts-from-res } if } { pop } ifelse } { pop } ifelse } { pop } ifelse } forall } bind def /Pattern { { exch pop oforce_no_circular dup //null ne { /Resources knownoget { get-fonts-from-res } if } { pop } ifelse } forall } bind def currentdict end readonly def % <dict for fonts> <<res-dict>> get-fonts-from-res - /get-fonts-from-res { oforce_no_circular dup //null ne { { oforce_no_circular dup //null ne { //res-type-dict 3 -1 roll .knownget { exec } { pop } ifelse } { pop pop } ifelse } forall } { pop } ifelse } bind def currentdict /res-type-dict undef /getPDFfonts { % <dict for fonts> <page dict> getPDFfonts - /ProcessedResources 10 dict def dup /Resources pget { get-fonts-from-res } if /Annots knownoget { { oforce_no_circular dup //null ne { /AP knownoget { { exch pop oforce_no_circular dup //null ne { dup /Resources knownoget { get-fonts-from-res } if { exch pop oforce_no_circular dup type /dicttype eq { /Resources knownoget { get-fonts-from-res } if } { pop } ifelse } forall } { pop } ifelse } forall } if } { pop } ifelse } forall } if pop currentdict /ProcessedResources undef } bind def % If running with -dSAFER, .sort may not be present. Define a (slower) PS alternative systemdict /.sort known not { % <array> <lt-proc> .sort <array> /.sort { 1 index length 1 sub -1 1 { 2 index exch 2 copy get 3 copy % arr proc arr i arr[i] arr i arr[i] 0 1 3 index 1 sub { 3 index 1 index get % arr proc arr i arr[i] arr imax amax j arr[j] 2 index 1 index 10 index exec { % ... amax < arr[j] 4 2 roll } if pop pop } for % arr proc arr i arr[i] arr imax amax 4 -1 roll exch 4 1 roll put put } for pop } bind def } if /dump-fonts-used { % <dict for fonts> dump-fonts-used - % If DumpFontsUsed is not true, then remove the 'standard' fonts from the list systemdict /DumpFontsUsed known not { StdFontNames { 1 index 1 index known { 1 index 1 index undef } if pop } forall } if % Now dump the FontsUsed dict into an array so we can sort it. [ 1 index { pop } forall ] { 100 string cvs exch 100 string cvs exch lt } .sort systemdict /DumpFontsUsed known { (\nFont or CIDFont resources used (plain name and ASCIIHEX string representation):) = { 128 string cvs dup print ( ) print (<) print 128 string cvs {16 8 string cvrs print} forall (>) print (\n) print} forall } { DumpFontsNeeded { dup length 0 gt { (\nFonts Needed that are not embedded \(system fonts required\):) = { ( ) print 128 string cvs dup print ( ) print (<) print {16 8 string cvrs print} forall (>) print (\n) print} forall } { pop (\nNo system fonts are needed.) = } ifelse } { pop } ifelse } ifelse pop } bind def % Copy selected subfiles to temporary files and return the file names % as a PostScript names to protect them from restore. % Currently, all PDF files in the Portfolio are extracted and returned. % % - pdf_collection_files [ /temp_file_name ... /temp_file_name /pdf_collection_files { mark Trailer /Root oget dup /Collection oknown { /Names knownoget { /EmbeddedFiles knownoget { pdf_collection_names } if } if } { pop } ifelse } bind def % Output all the info about the file /dump { % (title) -> - /PDFPageCount pdfpagecount def dump-pdf-info % dict will be populated with fonts through a call to 'getPDFfonts' % per page, then the contents dumped out in 'dump-fonts-used' 1000 dict 1 1 PDFPageCount { dup pdfgetpage dup 3 -1 roll dump-media-sizes 1 index exch getPDFfonts } for dump-fonts-used } bind def % Choose between collection vs plain file. % Enumerate collections and apply the dump procedure. /enum-pdfs { % - -> - File (r) file runpdfbegin pdf_collection_files dup mark eq { pop File dump runpdfend } { runpdfend ] 0 1 2 index length 1 sub { 2 copy get exch % [file ... ] file i 1 add (0123456789) cvs % [file ... ] file (i+1) File exch ( part ) exch concatstrings concatstrings exch % [file ... ] (fname part i+1) file dup type /filetype eq { runpdfbegin dump runpdfend closefile } { 1024 string cvs % .namestring is deprecated % .namestring dup (r) file runpdfbegin exch dump runpdfend deletefile } ifelse } for pop } ifelse } bind def enum-pdfs end quit
Save
cmd:
run