summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-11-27 04:11:08 +0000
committerAkira Kakuto <kakuto@fuk.kindai.ac.jp>2022-11-27 04:11:08 +0000
commit641523caae5f95691407e52d350ec6be833b6373 (patch)
treecacebf34a0b38a8689310e9eb874e9f16687bbdf
parentc46d016a0c497ab7f44424f32d8133cd0df67d38 (diff)
gs: recover gs 9.56.1
git-svn-id: svn://tug.org/texlive/trunk@65113 c570f23f-e606-0410-a88d-b1316a301751
-rw-r--r--Master/tlpkg/tlgs/README.TEXLIVE2
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps6
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps9
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_init.ps4
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/gs_type1.ps8
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps2
-rw-r--r--Master/tlpkg/tlgs/Resource/Init/pdf_main.ps518
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gsdll32.dllbin14579712 -> 14564864 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gsdll64.dllbin16459264 -> 16438272 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin32.exebin210944 -> 210944 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin32c.exebin204288 -> 204288 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin64.exebin240640 -> 240640 bytes
-rwxr-xr-xMaster/tlpkg/tlgs/bin/gswin64c.exebin231936 -> 231936 bytes
-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
21 files changed, 234 insertions, 490 deletions
diff --git a/Master/tlpkg/tlgs/README.TEXLIVE b/Master/tlpkg/tlgs/README.TEXLIVE
index e6e4f17487a..eceb6f81daa 100644
--- a/Master/tlpkg/tlgs/README.TEXLIVE
+++ b/Master/tlpkg/tlgs/README.TEXLIVE
@@ -1,5 +1,5 @@
-This directory contains a subset of the Ghostscript 10.0.0 distribution
+This directory contains a subset of the Ghostscript 9.56.1 distribution
for Windows. The only purpose of this package is to support programs
shipped with TeX Live. It's not intended for general use.
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps b/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps
index fce2e2363bb..7f2329d6ab3 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2022 Artifex Software, Inc.
+% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -120,9 +120,7 @@
% even if HiResBoundingBox occurs first in the EPS file.
//systemdict /EPSBoundingBoxState get 1 index lt {
% save the BBoxString for possible FitPage when EndComments is seen
- exch dup currentglobal //true setglobal exch
- dup length string copy //systemdict /EPSBoundingBoxString 3 -1 roll .forceput
- setglobal
+ exch dup //systemdict /EPSBoundingBoxString 3 -1 roll .forceput
EPSBoundingBoxParse
{
//systemdict /EPSCrop known {
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps b/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps
index 1b1f852aa49..aaee616f4af 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2022 Artifex Software, Inc.
+% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -432,7 +432,6 @@ FONTPATH
/FONTMAP where
{
dup /FONTMAP get /FONTMAP exch [ exch //.pathlist exec] put
- /FONTMAP dup where pop exch get {/PermitFileReading exch .addcontrolpath} forall
} if
% Try to enumerate native fonts registered with the os
@@ -930,14 +929,10 @@ FAKEFONTS not { (%END FAKEFONTS) .skipeof } if
} if
% No aliasing.
% This mode is incompatible with high level devices.
- defaultfontname /None eq { /findfont cvx /invalidfont signalerror } if
cleartomark mark defaultfontname
} {
dup .substitutefont
- 2 copy eq {
- defaultfontname /None eq { /findfont cvx /invalidfont signalerror } if
- pop defaultfontname
- } if
+ 2 copy eq { pop defaultfontname } if
//.checkalias exec
QUIET not {
SHORTERRORS {
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_init.ps b/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
index f1e6d7d684d..ada1811b177 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_init.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2022 Artifex Software, Inc.
+% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -34,7 +34,7 @@
% Interpreter library version number
% NOTE: the interpreter code requires that the first non-comment token
% in this file be an integer, and that it match the compiled-in version!
-10000
+9561
% Check the interpreter revision.
dup revision ne
diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps b/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps
index ef36509377f..fa3cdd8826e 100644
--- a/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps
@@ -1,4 +1,4 @@
-% Copyright (C) 2001-2022 Artifex Software, Inc.
+% Copyright (C) 2001-2021 Artifex Software, Inc.
% All Rights Reserved.
%
% This software is provided AS-IS with no warranty, either express or
@@ -224,12 +224,6 @@ currentdict /.loadfont1 .undef
ifelse
/.notdef CharStrings /.notdef get
} if
- dup type /integertype eq
- currentdict /CFFCharStrings known and
- {
- CFFCharStrings exch .knownget not
- { CFFCharStrings 0 get} if
- } if
end
} bind def
diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
index 117b362cfb9..691a8bd6a91 100644
--- a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps
@@ -1421,7 +1421,7 @@ currentdict end readonly def
% untouched as set above.
%
currentpagedevice dup
- /Overprint .knownget {/simulate eq}{false} ifelse
+ /Overprint get /simulate eq
1 index /PageSpotColors known not and
exch /PageUsesOverprint .knownget not { //false } if
and
diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps
index 4aa2595f941..3259c0fe34d 100644
--- a/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps
+++ b/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps
@@ -258,9 +258,6 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
% Uses currentdict as an argument to pdfclose, which closes /PDFfile. Also
% executes restore and various cleanup activities.
%
-% pdfavailable - pdfavailable <bool>
-% Determines if there is a PDF interpreter available
-%
% Also Used by gsview 5
% =====================
% pdfopen <file> pdfopen <dict>
@@ -344,14 +341,10 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
/PageUsesTransparency exch % << >> <<page dict>> /PageUsesTransparency bool
3 index 3 1 roll % << >> <<page dict>> <<info dict>> << >> /PageUsesTransparency bool
put % <</PageUsesTransparency bool>> <<page dict>>
- currentpagedevice /PageSpotColors known {
- /NumSpots get % <</PageUsesTransparency bool>> int
- /PageSpotColors exch % <</PageUsesTransparency bool>> /PageSpotColors int
- 2 index 3 1 roll % <</PageUsesTransparency bool>> <<page dict>> /PageSpotColors int
- put % <</PageUsesTransparency bool /PageSpotColors int >>
- }{
- pop
- } ifelse
+ /NumSpots get % <</PageUsesTransparency bool>> int
+ /PageSpotColors exch % <</PageUsesTransparency bool>> /PageSpotColors int
+ 2 index 3 1 roll % <</PageUsesTransparency bool>> <<page dict>> /PageSpotColors int
+ put % <</PageUsesTransparency bool /PageSpotColors int >>
setpagedevice
}bind def
@@ -371,7 +364,6 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
3 1 roll eq
or % square media or square page, no point in rotating
{
- pop pop pop pop
//false
}
{
@@ -417,33 +409,15 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
translate
% Now use the box and media values to calculate the required x/y scale factors
- 4 copy % Stack - box boxwidth boxheight mediawidth mediaheight boxwidth boxheight mediawidth mediaheight
- 3 -1 roll div % box boxwidth boxheight mediawidth mediaheight boxwidth mediawidth (mediaheight / boxheight)
- 3 1 roll % box boxwidth boxheight mediawidth mediaheight (mediaheight / boxheight) boxwidth mediawidth
- exch % box boxwidth boxheight mediawidth mediaheight (mediaheight / boxheight) mediawidth boxwidth
- div % box boxwidth boxheight mediawidth mediaheight (mediaheight / boxheight) (mediawidth / boxwidth)
-
- % Stack - box boxwidth boxheight mediawidth mediaheight Yscale Xscale
-
- % Centre the output on the media
- 2 copy % box boxwidth boxheight mediawidth mediaheight Yscale Xscale Yscale Xscale
- gt {
- exch pop % box boxwidth boxheight mediawidth mediaheight Xscale
- dup 4 index mul % box boxwidth boxheight mediawidth mediaheight Xscale (boxheight * Xscale)
- 3 -1 roll sub dup
- 0 lt {-1 mul} if % box boxwidth boxheight mediawidth Xscale ((boxheight * Xscale) - mediaheight)
- dup 0 ne {2 div} if % box boxwidth boxheight mediawidth Xscale (heightdiff / 2)
- 0 exch translate % box boxwidth boxheight mediawidth Xscale
- } {
- pop % box boxwidth boxheight mediawidth mediaheight Yscale
- dup 5 index mul % box boxwidth boxheight mediawidth mediaheight Yscale (boxwidth * Yscale)
- 4 -1 roll sub dup
- 0 lt {-1 mul} if % box boxwidth boxheight mediaheight Yscale ((boxwidth * Yscale) - mediawidth)
- dup 0 ne {2 div} if % box boxwidth boxheight mediawidth Yscale (widthdiff / 2)
- 0 translate % box boxwidth boxheight mediawidth Yscale
- } ifelse
- dup scale % scale both axes the same
- pop pop pop % remove the leftover boxwidth, boxheight and mediawidth/height
+ 3 -1 roll div % box boxwidth mediawidth (mediaheight / boxheight)
+ 3 1 roll % box (mediaheight / boxheight) boxwidth mediawidth
+ exch % box (mediaheight / boxheight) mediawidth boxwidth
+ div % box (mediaheight / boxheight) (mediawidth / boxwidth)
+
+ 2 copy % box Yscale Xscale Yscale Xscale
+ gt {exch} if % select smallest scale factor
+ pop %
+ dup scale % and scale page isomorphically
} bind def
/newpdf_get_media_box { % <pagedict> get_media_box <box> <bool>
@@ -798,88 +772,172 @@ systemdict /NEWPDF known not {/NEWPDF //true def} if
% NB device parameters will already have been sent to the device and used to configure it
% so here we should only handle parameters which control the behaviour of the interpreter.
%
-/PDFSwitches [ /QUIET /PDFPassword /PDFDEBUG /PDFSTOPONERROR /PDFSTOPONWARNING /NOTRANSPARENCY /FirstPage /LastPage
- /PDFNOCIDFALLBACK /NO_PDFMARK_OUTLINES /NO_PDFMARK_DESTS /PDFFitPage /Printed /UsePDFX3Profile
- /UseBleedBox /UseCropBox /UseArtBox /UseTrimBox /ShowAcroForm /ShowAnnots /PreserveAnnots
- /NoUserUnit /RENDERTTNOTDEF /DOPDFMARKS /PDFINFO /SHOWANNOTTYPES /PRESERVEANNOTTYPES
- /CIDFSubstPath /CIDFSubstFont /SUBSTFONT /IgnoreToUnicode /NONATIVEFONTMAP ] def
-
/newpdf_gather_parameters
{
10 dict begin
-
- //PDFSwitches {
- dup where
- { exch dup 3 1 roll get def }
- { pop } ifelse
- } forall
-
- % This isn't a command line parameter, we track it internally, but we need to
- % send it to the interpreter. It is used to 'offset' the page Dest for Link
- % annotations and Outlines by the numebr of pages processed so far.
- /PageCount CumulativePageCount def
-
+ /PDFSwitches [ /QUIET /PDFPassword /PDFDEBUG /PDFSTOPONERROR /PDFSTOPONWARNING /NOTRANSPARENCY /FirstPage /LastPage
+ /PDFNOCIDFALLBACK /NO_PDFMARK_OUTLINES /NO_PDFMARK_DESTS /PDFFitPage /Printed /UsePDFX3Profile
+ /UseBleedBox /UseCropBox /UseArtBox /UseTrimBox /ShowAcroForm /ShowAnnots /PreserveAnnots
+ /NoUserUnit /RENDERTTNOTDEF /DOPDFMARKS /PDFINFO /SHOWANNOTTYPES /PRESERVEANNOTTYPES
+ /CIDSubstPath /CIDSubstFont /IgnoreToUnicode /NONATIVEFONTMAP ] def
+
+ 0 1 PDFSwitches length 1 sub {
+ PDFSwitches exch get dup where {
+ exch dup 3 1 roll get def
+ }
+ {
+ pop
+ } ifelse
+ } for
+ currentdict /PDFSwitches undef
currentdict end
} bind executeonly def
-currentdict /PDFSwitches undef
-
/newpdf_pagecount
{
- currentdict /PDFInfo known
+ PDFFile //null eq not
{
- PDFInfo
- }
- {
- PDFFile //null eq not
+ PDFFile {.PDFInfo} stopped not
{
- PDFSTOPONERROR
+ dup /NumPages known
{
- PDFFile .PDFInfo //false
+ /NumPages get
}
{
- PDFFile {.PDFInfo} stopped
+ pop 0
} ifelse
}
{
- //true
- }ifelse
-
- {
- <</NumPages 0>>
- } if
- } ifelse
-
- dup /NumPages known
- {
- /NumPages get
+ pop 0
+ } ifelse
}
{
- pop 0
+ 0
} ifelse
}bind def
/newpdf_runpdfpagerange
{
/PageList where {
- pop
- % make sure string is NUL terminated as C expects.
- PageList 1 string dup 0 0 put concatstrings
- pdfpagecount
- .PDFparsePageList
- dup 0 eq { % No ranges, error
- (\n **** Error: Invalid PageList: ) print
- PageList print
- (\n No pages will be processed.) = flush
- /runpdfpagerange cvx /syntaxerror signalerror
- } if
- array astore % move integer triples from the stack to the array
- % newpdf PDFPageList is an array of 3 elements per range: even/odd flag, start, end
- /PDFPageList exch def
- QUIET not {
- (Processing pages ) print PageList =only (.) = flush
- } if
- 1 pdfpagecount % dummy parameters for newpdf_dopages
+ pop PageList
+ (even) anchorsearch {
+ pop length 0 gt {
+ /runpdfpagerange cvx /syntaxerror signalerror
+ } if
+ /PDFPageList pdfpagecount 1 add array def
+ 2 2 pdfpagecount {
+ PDFPageList exch 1 put
+ } for
+ QUIET not {
+ (Processing even-numbered pages\n) print (1 through ) print pdfpagecount =only
+ (.) = flush
+ } if
+ } {
+ (odd) anchorsearch {
+ pop length 0 gt {
+ /runpdfpagerange cvx /syntaxerror signalerror
+ } if
+ /PDFPageList pdfpagecount 1 add array def
+ 1 2 pdfpagecount {
+ PDFPageList exch 1 put
+ } for
+ QUIET not {
+ (Processing odd-numbered pages\n) print (1 through ) print pdfpagecount =only
+ (.) = flush
+ } if
+ } {
+ %% validate string contents, check for digit comma or minus
+ dup
+ {
+ dup 44 eq not {
+ dup 45 eq not {
+ dup 48 lt 1 index 57 gt or {
+ /runpdfpagerange cvx /syntaxerror signalerror
+ } if
+ } if
+ } if
+ pop
+ }
+ forall
+ /PDFPageList pdfpagecount 1 add array def
+ {
+ (,) search {
+ %% We now have (post) (,) (pre)
+ exch pop %% get rid of the (,), leave the (post) as the string for the next iteration, deal with the section up to the comma
+ (-) search {
+ %% Now we have (end) (-) (start)
+ exch pop %% get rid of the minus (end) (start)
+ 0 exch {48 sub exch 10 mul add} forall
+ %% Make sure the start of the range is inside the number of available pages
+ dup pdfpagecount le {
+ exch
+ %% deal with a trailing '-' by replacing it with the number of pages in the file
+ dup length 0 eq {
+ pop pdfpagecount
+ }{
+ 0 exch {48 sub exch 10 mul add} forall
+ } ifelse
+ 1 exch %% start 1 end
+ %% Make sure the end of the range is inside the number of available pages
+ dup pdfpagecount gt {pop pdfpagecount} if
+ {PDFPageList exch 1 put} for
+ } {
+ %% start of range invalid, drop this range.
+ pop pop
+ }ifelse
+ }{
+ %% no minus signs, must be a simple page number
+ 0 exch {48 sub exch 10 mul add} forall
+ %% ensure its in the valid range of pages
+ dup pdfpagecount le {
+ PDFPageList exch 1 put
+ } {
+ pop
+ } ifelse
+ } ifelse
+ }{
+ %% no commas separating pages, just the original string (), deal with its as a section, then exit the loop
+ (-) search {
+ %% Now we have (end) (-) (start)
+ exch pop %% get rid of the minus (end) (start)
+ 0 exch {48 sub exch 10 mul add} forall
+ %% Make sure the start of the range is inside the number of available pages
+ dup pdfpagecount le {
+ exch
+ %% deal with a trailing '-' by replacing it with the number of pages in the file
+ dup length 0 eq {
+ pop pdfpagecount
+ }{
+ 0 exch {48 sub exch 10 mul add} forall
+ } ifelse
+ 1 exch %% start 1 end
+ %% Make sure the end of the range is inside the number of available pages
+ dup pdfpagecount gt {pop pdfpagecount} if
+ {PDFPageList exch 1 put} for
+ } {
+ %% start of range invalid, drop this range.
+ pop pop
+ }ifelse
+ }{
+ %% no minus signs, must be a simple page number
+ 0 exch {48 sub exch 10 mul add} forall
+ %% ensure its in the valid range of pages
+ dup pdfpagecount le {
+ PDFPageList exch 1 put
+ } {
+ pop
+ } ifelse
+ } ifelse
+ exit %% done all the sections.
+ } ifelse
+ } loop
+ QUIET not {
+ (Processing pages ) print PageList =only
+ (.) = flush
+ } if
+ } ifelse
+ } ifelse
+ 1 pdfpagecount
}{
/FirstPage where {
pop FirstPage dup pdfpagecount gt {
@@ -905,27 +963,22 @@ currentdict /PDFSwitches undef
/newpdf_runpdf
{
runpdfbegin % <file> runpdfbegin -
- PDFInfo type /dicttype eq
+ PDFInfo /Collection known
{
- PDFInfo /Collection known
+ PDFInfo /Collection get
+ pdfclose
+ dup length 1 sub 0 2 3 -1 roll
{
- PDFInfo /Collection get
- pdfclose
- dup length 1 sub 0 2 3 -1 roll
- {
- 1 index exch get (r) file runpdf
- } for
- pop
- }
- {
- process_trailer_attrs % - process_trailer_attrs -
- runpdfpagerange % - runpdfpagerange <int> <int>
- dopdfpages % <int> <int> dopdfpages -
- runpdfend % - runpdfend -
- } ifelse
- } {
- pop pop
- }ifelse
+ 1 index exch get (r) file runpdf
+ } for
+ pop
+ }
+ {
+ process_trailer_attrs % - process_trailer_attrs -
+ runpdfpagerange % - runpdfpagerange <int> <int>
+ dopdfpages % <int> <int> dopdfpages -
+ runpdfend % - runpdfend -
+ } ifelse
} bind def
/newpdf_runpdfbegin
@@ -933,8 +986,6 @@ currentdict /PDFSwitches undef
/pdfdict 10 dict def
pdfdict begin
- currentpagedevice /PageCount get
- /CumulativePageCount exch def
% This is for the benefit of pdf2dsc which assumes it will be present
/Trailer << >> def
/PDFSave save def
@@ -960,51 +1011,28 @@ currentdict /PDFSwitches undef
/pget {2 copy known {get //true}{pop pop //false}ifelse}bind def
newpdf_gather_parameters
- PDFSTOPONERROR
+ {.PDFInit} stopped
+ {
+ /PDFFile //null def
+ /PDFInfo //null def
+ }
{
- .PDFInit
/PDFFile exch def
pdfopen
/PDFInfo exch def
pop
- }
- {
- {.PDFInit} stopped
- {
- ( **** Error: Failed to initialise PDF interpreter.\n) newpdf_pdfformaterror
- /PDFFile //null def
- /PDFInfo //null def
- }
- {
- /PDFFile exch def
- pdfopen
- /PDFInfo exch def
- pop
- }ifelse
}ifelse
} bind def
/newpdf_pdfgetpage
{
- dup 1 sub
- PDFSTOPONERROR
- {
- PDFFile exch .PDFPageInfo
- dup 3 -1 roll
- /Page# exch put
- }
+ PDFFile exch 1 sub {.PDFPageInfo} stopped
{
- PDFFile exch {.PDFPageInfo} stopped
- {
- pop pop
- ( **** Error: Couldn't get page info.\n) newpdf_pdfformaterror
- ( Output may be incorrect.\n) newpdf_pdfformaterror
- //null
- }{
- dup 3 -1 roll
- /Page# exch put
- } ifelse
- }ifelse
+ pop pop
+ ( **** Error: Couldn't get page info.\n) newpdf_pdfformaterror
+ ( Output may be incorrect.\n) newpdf_pdfformaterror
+ //null
+ } if
} bind def
/newpdf_process_trailer_attrs
@@ -1024,88 +1052,54 @@ currentdict /PDFSwitches undef
/newpdf_pdfshowpage_finish
{
- PDFSTOPONERROR
+ /Page# get PDFFile exch 1 sub {.PDFDrawPage} stopped
{
- /Page# get PDFFile exch 1 sub .PDFDrawPage
- showpage
- }
+ pop pop
+ ( **** Error: Page drawing error occured.\n) newpdf_pdfformaterror
+ ( Output may be incorrect.\n) newpdf_pdfformaterror
+ } if
+ {showpage} stopped
{
- /Page# get PDFFile exch 1 sub {.PDFDrawPage} stopped
- {
- pop pop
- ( **** Error: Page drawing error occurred.\n) newpdf_pdfformaterror
- ( Output may be incorrect.\n) newpdf_pdfformaterror
- } if
- {showpage} stopped
- {
- ( **** Error: Page drawing error occurred.\n) newpdf_pdfformaterror
- ( Could not draw this page at all, page will be missing in the output.\n) newpdf_pdfformaterror
- } if
- }ifelse
+ ( **** Error: Page drawing error occured.\n) newpdf_pdfformaterror
+ ( Could not draw this page at all, page will be missing in the output.\n) newpdf_pdfformaterror
+ } if
grestore
} bind def
/newpdf_pdfshowpage
{
- /PDFINFO where {/PDFINFO get}{//false}ifelse
- {
- /Page# get PDFFile exch 1 sub {.PDFDrawPage} stopped pop
- }
- {
- pdfshowpage_init
- pdfshowpage_setpage
- pdfshowpage_finish
- }ifelse
+ pdfshowpage_init
+ pdfshowpage_setpage
+ pdfshowpage_finish
} bind def
/newpdf_runpdfend
{
- % Get the accumulated count of pages processed so far
- % and the number of pages in this file. Do this before
- % we close the file and restore the state. Save the values
- % on the stack.
- pdfpagecount
- CumulativePageCount
-
pdfclose
PDFSave restore
-
end % pdfdict
-
- % add the number of pages in this file to the accumulated count,
- % and store that in the device for later reuse. This allows us to
- % add the number of pages already in the output to the 'Dest' of
- % Outlines and Link annotations.
- add <</PageCount 3 -1 roll >> setpagedevice
} bind def
/newpdf_pdfopen
{
dup PDFFile //null ne
{
- PDFSTOPONERROR
+ PDFFile {.PDFStream} stopped
{
- PDFFile .PDFStream
- PDFFile .PDFInfo
+ pop pop
+ ( **** Error: Couldn't initialise file.\n) newpdf_pdfformaterror
+ ( Output may be incorrect.\n) newpdf_pdfformaterror
+ <</NumPages 0>>
}
{
- PDFFile {.PDFStream} stopped
+ PDFFile {.PDFInfo} stopped
{
- pop pop
- ( **** Error: Couldn't initialise file.\n) newpdf_pdfformaterror
+ pop
+ ( **** Error: Couldn't get page information.\n) newpdf_pdfformaterror
( Output may be incorrect.\n) newpdf_pdfformaterror
<</NumPages 0>>
- }
- {
- PDFFile {.PDFInfo} stopped
- {
- pop
- ( **** Error: Couldn't get page information.\n) newpdf_pdfformaterror
- ( Output may be incorrect.\n) newpdf_pdfformaterror
- <</NumPages 0>>
- } if
- } ifelse
- }ifelse
+ } if
+ } ifelse
}
{
pop
@@ -1115,48 +1109,30 @@ currentdict /PDFSwitches undef
/newpdf_pdfclose
{
- PDFSTOPONERROR
+ PDFFile {.PDFClose} stopped
{
- PDFFile .PDFClose
- }
- {
- PDFFile {.PDFClose} stopped
- {
- pop
- } if
- }ifelse
-} bind def
-
-/pdfavailable
-{
- .PDFAvailable NEWPDF not or
+ pop
+ } if
} bind def
% <int> <int> dopdfpages -
% First Page and then LastPage
-% If PDFPageList array exists, the parameters are 1 pdfpagecount and are ignored.
/newpdf_dopdfpages
{
//DisablePageHandlerDevice exec
- %% If we have a array of page ranges to render, use it.
- /PDFPageList where {
- pop
- pop pop % don't use dummy parameters
- PDFPageList
- % process the ranges (3 elements per range)
- 0 3 2 index length 1 sub {
- 1 index 1 index get % even = 2, odd = 1 any = 0
- 2 index 2 index 1 add get % start of range
- exch
- 3 index 3 index 2 add get % end of range
- exch
- % stack: start end even/odd
- 0 eq { 1 } { 2 } ifelse
- 2 index 2 index gt { neg } if % negate increment for reverse range
- exch
+ 1 exch
+ {
+ %% If we have a array of pages to render, use it.
+ /PDFPageList where {
+ pop dup PDFPageList exch get 1 eq
+ }
+ {//true} ifelse
+
{
- pdfgetpage
+ dup pdfgetpage
dup //null ne {
+ exch 1 index
+ /Page# 3 -1 roll put
pdfshowpage
} {
PDFSTOPONERROR {
@@ -1167,28 +1143,10 @@ currentdict /PDFSwitches undef
( not found.\n) newpdf_pdfformaterror
} ifelse
} ifelse
- } for
- pop % for loop index
- } for
- pop % done with array
- } {
- % else, Process the pages given by the FirstPage, LastPage
- 1 exch
- {
- pdfgetpage
- dup //null ne {
- pdfshowpage
- } {
- PDFSTOPONERROR {
- /dopdfpages cvx /syntaxerror signalerror
- } {
- pop pop
- ( **** Error: page) newpdf_pdfformaterror
- ( not found.\n) newpdf_pdfformaterror
- } ifelse
- } ifelse
- } for
- } ifelse
+ }{
+ pop
+ }ifelse
+ } for
//EnablePageHandlerDevice exec
} bind def
@@ -1237,20 +1195,10 @@ currentdict /PDFSwitches undef
% stack: tempname tempfile
dup 0 setfileposition
dup
- pdfavailable {
- runpdf
- }{
- closefile
- (%stderr) (w) file ( **** ERROR: No PDF interpreter available, unable to process PDF files as input.\n)writestring
- } ifelse
+ runpdf
closefile deletefile
} {
- pdfavailable {
- runpdf
- }{
- closefile
- (%stderr) (w) file ( **** ERROR: No PDF interpreter available, unable to process PDF files as input.\n)writestring
- } ifelse
+ runpdf
} ifelse
} {
pop pop pop pop cvx .runps % (%!PS) found first
@@ -1271,7 +1219,6 @@ currentdict /runpdfstring .undef
newpdf_runpdfbegin
}
{
- (%stderr) (w) file (\n **** Warning: You are using the legacy PDF interpreter \(-dNEWPDF=false\) which is now deprecated and unsupported\n) writestring
userdict begin
% It turns out that the PDF interpreter uses memory more
% effectively if it is run under at least one level of save.
@@ -1649,26 +1596,7 @@ currentdict /EnablePageHandlerDevice undef
/runpdf { % <file> runpdf -
/NEWPDF where {/NEWPDF get} {//true} ifelse
- {
- dup type /filetype eq
- {
- dup
- PDFSTOPONERROR
- {
- newpdf_runpdf
- }
- {
- {newpdf_runpdf} stopped
- {
- ( **** Error: PDF interpreter encountered an error processing the file.\n) pdfformaterror
- } if
- }ifelse
- closefile
- }
- {
- ( **** Error: Attempt to process something other than a file object in runpdf.\n) pdfformaterror
- } ifelse
- }
+ {newpdf_runpdf}
{
%% Get the PDF filename (it *must* be a file even if it came from stdin it gets
%% copied to a temporary file) and store it in pdfdict. We will use this for
diff --git a/Master/tlpkg/tlgs/bin/gsdll32.dll b/Master/tlpkg/tlgs/bin/gsdll32.dll
index d9f28a953ab..13779e711d7 100755
--- a/Master/tlpkg/tlgs/bin/gsdll32.dll
+++ b/Master/tlpkg/tlgs/bin/gsdll32.dll
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gsdll64.dll b/Master/tlpkg/tlgs/bin/gsdll64.dll
index 1c22ca61a4c..ccc45e3e5f3 100755
--- a/Master/tlpkg/tlgs/bin/gsdll64.dll
+++ b/Master/tlpkg/tlgs/bin/gsdll64.dll
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin32.exe b/Master/tlpkg/tlgs/bin/gswin32.exe
index 13202c7b32a..7345772111c 100755
--- a/Master/tlpkg/tlgs/bin/gswin32.exe
+++ b/Master/tlpkg/tlgs/bin/gswin32.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin32c.exe b/Master/tlpkg/tlgs/bin/gswin32c.exe
index 4de996b1721..83a0a415cca 100755
--- a/Master/tlpkg/tlgs/bin/gswin32c.exe
+++ b/Master/tlpkg/tlgs/bin/gswin32c.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin64.exe b/Master/tlpkg/tlgs/bin/gswin64.exe
index 2ba86626f0e..8a1c9230a0a 100755
--- a/Master/tlpkg/tlgs/bin/gswin64.exe
+++ b/Master/tlpkg/tlgs/bin/gswin64.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/bin/gswin64c.exe b/Master/tlpkg/tlgs/bin/gswin64c.exe
index 02eef8a431e..4e27dae815e 100755
--- a/Master/tlpkg/tlgs/bin/gswin64c.exe
+++ b/Master/tlpkg/tlgs/bin/gswin64c.exe
Binary files differ
diff --git a/Master/tlpkg/tlgs/lib/pdf_info.ps b/Master/tlpkg/tlgs/lib/pdf_info.ps
index 2a5f5796658..35951e9a736 100644
--- a/Master/tlpkg/tlgs/lib/pdf_info.ps
+++ b/Master/tlpkg/tlgs/lib/pdf_info.ps
@@ -527,164 +527,6 @@ systemdict /.sort known not {
} ifelse
} bind def
-/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
+enum-pdfs
end
quit
diff --git a/Master/tlpkg/tlgs/lib/viewcmyk.ps b/Master/tlpkg/tlgs/lib/viewcmyk.ps
index 33c5bdceb15..e8034e53346 100644
--- a/Master/tlpkg/tlgs/lib/viewcmyk.ps
+++ b/Master/tlpkg/tlgs/lib/viewcmyk.ps
@@ -56,8 +56,6 @@
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 54453fe4d83..71cb5d44131 100644
--- a/Master/tlpkg/tlgs/lib/viewjpeg.ps
+++ b/Master/tlpkg/tlgs/lib/viewjpeg.ps
@@ -35,9 +35,6 @@
% 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 143a056a68a..c8d3f86bc84 100644
--- a/Master/tlpkg/tlgs/lib/viewpbm.ps
+++ b/Master/tlpkg/tlgs/lib/viewpbm.ps
@@ -327,8 +327,6 @@
( 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 0b549ad90fe..76bfdfae6eb 100644
--- a/Master/tlpkg/tlgs/lib/viewpcx.ps
+++ b/Master/tlpkg/tlgs/lib/viewpcx.ps
@@ -183,8 +183,6 @@
{ 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 85438ffa103..dee86e02300 100644
--- a/Master/tlpkg/tlgs/lib/viewraw.ps
+++ b/Master/tlpkg/tlgs/lib/viewraw.ps
@@ -181,8 +181,6 @@
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 c2c34fec635..ab2f6d82c4a 100644
--- a/Master/tlpkg/tlgs/lib/viewrgb.ps
+++ b/Master/tlpkg/tlgs/lib/viewrgb.ps
@@ -143,8 +143,6 @@
( 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 d20c39edc0c..97d33d4d2b4 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)