summaryrefslogtreecommitdiff
path: root/Master/tlpkg/tlgs/lib
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-09-22 21:45:38 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-09-22 21:45:38 +0000
commitb0a92be7ce8e8f115c0152d2409e5b817da11326 (patch)
tree3c14eaf7effadcb3b5b313c01740531abbef5abe /Master/tlpkg/tlgs/lib
parent708e30f76a55f8bd890b484772860e1a6dde014d (diff)
tlgs (gs 10.00.0)
git-svn-id: svn://tug.org/texlive/trunk@64478 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/tlpkg/tlgs/lib')
-rw-r--r--Master/tlpkg/tlgs/lib/pdf_info.ps160
-rw-r--r--Master/tlpkg/tlgs/lib/viewcmyk.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/viewjpeg.ps3
-rw-r--r--Master/tlpkg/tlgs/lib/viewpbm.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/viewpcx.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/viewraw.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/viewrgb.ps2
-rw-r--r--Master/tlpkg/tlgs/lib/zugferd.ps2
8 files changed, 173 insertions, 2 deletions
diff --git a/Master/tlpkg/tlgs/lib/pdf_info.ps b/Master/tlpkg/tlgs/lib/pdf_info.ps
index 35951e9a736..2a5f5796658 100644
--- a/Master/tlpkg/tlgs/lib/pdf_info.ps
+++ b/Master/tlpkg/tlgs/lib/pdf_info.ps
@@ -527,6 +527,164 @@ systemdict /.sort known not {
} ifelse
} bind def
-enum-pdfs
+/NEWPDF where {/NEWPDF get}{false}ifelse
+{
+ /knownoget
+ {
+ 2 copy known {
+ get
+ true
+ }{
+ pop pop false
+ } ifelse
+ }bind def
+
+ /PDFContext << >> .PDFInit def
+ {File (r) file PDFContext .PDFStream} stopped not
+ {
+
+ PDFContext .PDFInfo
+ File
+ () = ( ) print print ( has ) print
+ dup /NumPages get dup =print 10 mod 1 eq { ( page.\n) } { ( pages\n) } ifelse = flush
+
+ /DumpXML where {/DumpXML get}{//false}ifelse
+ {
+ (\n*** DumpXML is no longer supported. ***\n\n) print
+ }if
+
+ 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
+ (\n) print flush
+
+ /EmbeddedFonts 10 dict def
+ /UnEmbeddedFonts 10 dict def
+ /FontNumbers 10 dict def
+
+ /NumPages get 0 1 3 -1 roll 1 sub
+ {
+ dup
+ PDFContext exch .PDFPageInfoExt exch
+ DumpMediaSizes {
+ (Page ) print 1 add =print
+ dup /UserUnit knownoget {( UserUnit: ) print =print} if
+ dup /MediaBox knownoget {( MediaBox: ) print ==only} if
+ dup /CropBox knownoget {( CropBox: ) print ==only} if
+ dup /BleedBox knownoget {( BleedBox: ) print ==only} if
+ dup /TrimBox knownoget {( TrimBox: ) print ==only} if
+ dup /ArtBox knownoget {( ArtBox: ) print ==only} if
+ dup /Rotate knownoget not {0}if ( Rotate = ) print =print
+ dup /Annots knownoget {{( Page contains Annotations) print} if} if
+ dup /UsesTransparency knownoget {{( Page uses transparency features) print} if} if
+ dup /Spots knownoget {
+ (\n Page Spot colors: ) =
+ {( ) print (') print 256 string cvs print (') =} forall
+ } if
+ (\n) print flush
+ (\n) print flush
+ }
+ {
+ pop
+ } ifelse
+
+ /Fonts knownoget
+ {
+ {
+ dup /ObjectNum known
+ {
+ %% Fonts with an ObjectNumber may have been previously referenced on another page
+ dup /ObjectNum get
+ dup FontNumbers exch known
+ {
+ pop
+ %% found the ObjectNumber in the FontNumbers dictionary so we've seen this one.
+ //false
+ }
+ {
+ %% Not seen before, add the number to the array and process this font
+ FontNumbers exch dup put
+ //true
+ }ifelse
+ }{
+ %% Fonts without an ObjectNumber are defined inline and so must be unique
+ //true
+ } ifelse
+ {
+ % First time we've seen the font
+ dup /Descendants known
+ {
+ dup /BaseFont get
+ EmbeddedFonts exch dup put % We class the Type 0 font as 'embedded', but it's really the descendant which is embedded or not.
+ dup /Descendants get
+ 1 index /BaseFont get
+ 2 index /Embedded get
+ {
+ EmbeddedFonts exch dup put
+ }
+ {
+ UnEmbeddedFonts exch dup put
+ }ifelse
+ pop
+ }
+ {
+ dup /BaseFont get
+ 1 index /Embedded get
+ {
+ EmbeddedFonts exch dup put
+ }
+ {
+ UnEmbeddedFonts exch dup put
+ } ifelse
+ }ifelse
+ pop
+ }
+ {
+ pop
+ } ifelse
+ }forall
+ } if
+ } for
+
+ /DumpFontsUsed where {/DumpFontsUsed get}{//false}ifelse
+ {
+ [
+ UnEmbeddedFonts {pop} forall
+ /ShowEmbeddedFonts where {/ShowEmbeddedFonts get}{//false}ifelse
+ {
+ EmbeddedFonts {pop} forall
+ } if
+ ]
+ dup length 0 gt {
+ { 100 string cvs exch 100 string cvs exch lt } .sort
+ (\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
+ } if
+ }
+ {
+ [
+ DumpFontsNeeded
+ {
+ UnEmbeddedFonts {pop} forall
+ } if
+ ]
+ dup length 0 gt {
+ { 100 string cvs exch 100 string cvs exch lt } .sort
+ (\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
+ } if
+ }ifelse
+ } if
+ PDFContext .PDFClose
+}
+{
+ enum-pdfs
+} ifelse
end
quit
diff --git a/Master/tlpkg/tlgs/lib/viewcmyk.ps b/Master/tlpkg/tlgs/lib/viewcmyk.ps
index e8034e53346..33c5bdceb15 100644
--- a/Master/tlpkg/tlgs/lib/viewcmyk.ps
+++ b/Master/tlpkg/tlgs/lib/viewcmyk.ps
@@ -56,6 +56,8 @@
cleartomark
(Usage: gs -- viewcmyk.ps filename.cmyk width\n) print
( e.g.: gs -- viewcmyk.ps my.cmyk 2550\n) print flush
+ (From version 9.50 you must supply permissions for this program to read the input file(s)\n) print flush
+ (either by using -dNOSAFER or by supplying --permit-file-read=<filename>\n) = flush
} ifelse
} {
pop
diff --git a/Master/tlpkg/tlgs/lib/viewjpeg.ps b/Master/tlpkg/tlgs/lib/viewjpeg.ps
index 71cb5d44131..54453fe4d83 100644
--- a/Master/tlpkg/tlgs/lib/viewjpeg.ps
+++ b/Master/tlpkg/tlgs/lib/viewjpeg.ps
@@ -35,6 +35,9 @@
% Usage example:
% (jpeg-6/testimg.jpg) viewJPEG
+% From version 9.50 you must supply permissions for this program
+% to read the input file(s) either by using -dNOSAFER or by
+% supplying --permit-file-read=<filename>
/languagelevel where {pop languagelevel 2 lt}{true} ifelse {
(JPEG needs PostScript Level 2!\n) print flush stop
diff --git a/Master/tlpkg/tlgs/lib/viewpbm.ps b/Master/tlpkg/tlgs/lib/viewpbm.ps
index c8d3f86bc84..143a056a68a 100644
--- a/Master/tlpkg/tlgs/lib/viewpbm.ps
+++ b/Master/tlpkg/tlgs/lib/viewpbm.ps
@@ -327,6 +327,8 @@
( e.g.: gs [-dSCALE=#.#] [-dFITPAGE] [--] viewpbm.ps my.ppm another.ppm\n) print flush
( also -dTAG option can be used to show the pseudo-color tag image from a\n) print flush
( P7 RGB_TAG PAM file created by the bitrgbtags device.\n) print flush
+ (From version 9.50 you must supply permissions for this program to read the input file(s)\n) print flush
+ (either by using -dNOSAFER or by supplying --permit-file-read=<filename>\n) = flush
}
ifelse
}
diff --git a/Master/tlpkg/tlgs/lib/viewpcx.ps b/Master/tlpkg/tlgs/lib/viewpcx.ps
index 76bfdfae6eb..0b549ad90fe 100644
--- a/Master/tlpkg/tlgs/lib/viewpcx.ps
+++ b/Master/tlpkg/tlgs/lib/viewpcx.ps
@@ -183,6 +183,8 @@
{ cleartomark
(Usage: gs -- viewpcx.ps filename.pcx ...\n) print
( e.g.: gs -- viewpcx.ps my.pcx another.pcx\n) print flush
+ (From version 9.50 you must supply permissions for this program to read the input file(s)\n) print flush
+ (either by using -dNOSAFER or by supplying --permit-file-read=<filename>\n) = flush
}
ifelse
}
diff --git a/Master/tlpkg/tlgs/lib/viewraw.ps b/Master/tlpkg/tlgs/lib/viewraw.ps
index dee86e02300..85438ffa103 100644
--- a/Master/tlpkg/tlgs/lib/viewraw.ps
+++ b/Master/tlpkg/tlgs/lib/viewraw.ps
@@ -181,6 +181,8 @@
cleartomark
(Usage: gs -- viewraw filename.raw width\n) print
( e.g.: gs -- viewraw my.raw 2550\n) print flush
+ (From version 9.50 you must supply permissions for this program to read the input file(s)\n) print flush
+ (either by using -dNOSAFER or by supplying --permit-file-read=<filename>\n) = flush
} ifelse
} {
pop
diff --git a/Master/tlpkg/tlgs/lib/viewrgb.ps b/Master/tlpkg/tlgs/lib/viewrgb.ps
index ab2f6d82c4a..c2c34fec635 100644
--- a/Master/tlpkg/tlgs/lib/viewrgb.ps
+++ b/Master/tlpkg/tlgs/lib/viewrgb.ps
@@ -143,6 +143,8 @@
( e.g.: gs -- viewrgb.ps my.rgb 2550\n) print flush
( -dSCALE=### sets specific scaling \(default = 1.0\)) = flush
( -dBITS=# sets the BitsPerComponent \(1, 2, 8, 12] \(default = 1\)) = flush
+ (From version 9.50 you must supply permissions for this program to read the input file(s)\n) print flush
+ (either by using -dNOSAFER or by supplying --permit-file-read=<filename>\n) = flush
} ifelse
} {
pop
diff --git a/Master/tlpkg/tlgs/lib/zugferd.ps b/Master/tlpkg/tlgs/lib/zugferd.ps
index 97d33d4d2b4..d20c39edc0c 100644
--- a/Master/tlpkg/tlgs/lib/zugferd.ps
+++ b/Master/tlpkg/tlgs/lib/zugferd.ps
@@ -455,7 +455,7 @@ ZUGFeRDVersion (2p1) eq {
[ /_objdef {FSDict} /type /dict /OBJ pdfmark
% Fill in the required dictionary elements
[ {FSDict} <<
- /Type /FileSpec
+ /Type /Filespec
/F ZUGFeRDDocumentFileName
/UF ZUGFeRDDocumentFileName SimpleUTF16BE
/Desc (ZUGFeRD electronic invoice)