From 915fcaa574f1e0e3caf480005f9ef3dabb529ebf Mon Sep 17 00:00:00 2001 From: Reinhard Kotucha Date: Wed, 21 Apr 2021 21:26:34 +0000 Subject: Downgrade gs-9.54.0 -> gs-9.53.3 due to errors reported by Ulrike Fischer git-svn-id: svn://tug.org/texlive/trunk@58939 c570f23f-e606-0410-a88d-b1316a301751 --- Master/source/ghostscript-9.53.3.tar.xz | Bin 0 -> 41368160 bytes Master/source/ghostscript-9.54.0.tar.xz | Bin 56001768 -> 0 bytes Master/tlpkg/tlgs/README.TEXLIVE | 4 +- Master/tlpkg/tlgs/Resource/CIDFont/ArtifexBullet | Bin 2664 -> 2659 bytes Master/tlpkg/tlgs/Resource/CMap/Identity-UTF16-H | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/DefaultCMYK | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/DefaultGray | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/DefaultRGB | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/TrivialCMYK | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/sGray | 2 +- Master/tlpkg/tlgs/Resource/ColorSpace/sRGB | 2 +- Master/tlpkg/tlgs/Resource/Decoding/FCO_Dingbats | 2 +- Master/tlpkg/tlgs/Resource/Decoding/FCO_Symbol | 2 +- Master/tlpkg/tlgs/Resource/Decoding/FCO_Unicode | 2 +- Master/tlpkg/tlgs/Resource/Decoding/FCO_Wingdings | 2 +- Master/tlpkg/tlgs/Resource/Decoding/Latin1 | 2 +- .../tlpkg/tlgs/Resource/Decoding/StandardEncoding | 2 +- Master/tlpkg/tlgs/Resource/Decoding/Unicode | 2 +- Master/tlpkg/tlgs/Resource/Encoding/CEEncoding | 2 +- Master/tlpkg/tlgs/Resource/Encoding/ExpertEncoding | 2 +- .../tlgs/Resource/Encoding/ExpertSubsetEncoding | 2 +- Master/tlpkg/tlgs/Resource/Encoding/NotDefEncoding | 2 +- Master/tlpkg/tlgs/Resource/Encoding/Wingdings | 2 +- Master/tlpkg/tlgs/Resource/IdiomSet/PPI_CUtils | 24 - Master/tlpkg/tlgs/Resource/Init/FCOfontmap-PCLPS2 | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_agl.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_btokn.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cff.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cidcm.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_ciddc.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cidfm.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cidtt.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cmap.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_cspace.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_dbt_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_diskn.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_dps1.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_dps2.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_dscp.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps | 76 +-- Master/tlpkg/tlgs/Resource/Init/gs_fapi.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_fntem.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps | 24 +- Master/tlpkg/tlgs/Resource/Init/gs_icc.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_il1_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_img.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_init.ps | 15 +- Master/tlpkg/tlgs/Resource/Init/gs_lev2.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_ll3.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_mex_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_mgl_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_mro_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_pdf_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_pdfwr.ps | 15 +- Master/tlpkg/tlgs/Resource/Init/gs_res.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_resmp.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_setpd.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_statd.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_std_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_sym_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_trap.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps | 22 +- Master/tlpkg/tlgs/Resource/Init/gs_typ32.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_typ42.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_type1.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/gs_wan_e.ps | 2 +- Master/tlpkg/tlgs/Resource/Init/pdf_base.ps | 60 +-- Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps | 120 ++--- Master/tlpkg/tlgs/Resource/Init/pdf_font.ps | 23 +- Master/tlpkg/tlgs/Resource/Init/pdf_main.ps | 520 ++++----------------- Master/tlpkg/tlgs/Resource/Init/pdf_ops.ps | 101 ++-- Master/tlpkg/tlgs/Resource/Init/pdf_rbld.ps | 31 +- Master/tlpkg/tlgs/Resource/Init/pdf_sec.ps | 34 +- Master/tlpkg/tlgs/Resource/SubstCID/CNS1-WMode | 2 +- Master/tlpkg/tlgs/Resource/SubstCID/GB1-WMode | 2 +- Master/tlpkg/tlgs/Resource/SubstCID/Japan1-WMode | 2 +- Master/tlpkg/tlgs/Resource/SubstCID/Korea1-WMode | 2 +- Master/tlpkg/tlgs/bin/gsdll32.dll | Bin 11297280 -> 8326144 bytes Master/tlpkg/tlgs/bin/gsdll32.lib | Bin 12018 -> 12018 bytes Master/tlpkg/tlgs/bin/gswin32.exe | Bin 212992 -> 143360 bytes Master/tlpkg/tlgs/bin/gswin32c.exe | Bin 206848 -> 134656 bytes Master/tlpkg/tlgs/lib/align.ps | 2 +- Master/tlpkg/tlgs/lib/caption.ps | 2 +- Master/tlpkg/tlgs/lib/cid2code.ps | 2 +- Master/tlpkg/tlgs/lib/docie.ps | 2 +- Master/tlpkg/tlgs/lib/gs_ce_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_css_e.ps | 117 ----- Master/tlpkg/tlgs/lib/gs_il2_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_kanji.ps | 2 +- Master/tlpkg/tlgs/lib/gs_ksb_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_lgo_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_lgx_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_wl1_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_wl2_e.ps | 2 +- Master/tlpkg/tlgs/lib/gs_wl5_e.ps | 2 +- Master/tlpkg/tlgs/lib/gslp.ps | 2 +- Master/tlpkg/tlgs/lib/gsnup.ps | 2 +- Master/tlpkg/tlgs/lib/image-qa.ps | 2 +- Master/tlpkg/tlgs/lib/jispaper.ps | 2 +- Master/tlpkg/tlgs/lib/lines.ps | 2 +- Master/tlpkg/tlgs/lib/mkcidfm.ps | 2 +- Master/tlpkg/tlgs/lib/pdf2dsc.ps | 2 +- Master/tlpkg/tlgs/lib/pdf_info.ps | 155 ++---- Master/tlpkg/tlgs/lib/pfbtopfa.ps | 2 +- Master/tlpkg/tlgs/lib/ppath.ps | 2 +- Master/tlpkg/tlgs/lib/pphs.ps | 2 +- Master/tlpkg/tlgs/lib/prfont.ps | 2 +- Master/tlpkg/tlgs/lib/ps2ai.ps | 2 +- Master/tlpkg/tlgs/lib/ps2epsi.ps | 2 +- Master/tlpkg/tlgs/lib/rollconv.ps | 2 +- Master/tlpkg/tlgs/lib/stocht.ps | 2 +- Master/tlpkg/tlgs/lib/traceimg.ps | 2 +- Master/tlpkg/tlgs/lib/traceop.ps | 2 +- Master/tlpkg/tlgs/lib/uninfo.ps | 2 +- Master/tlpkg/tlgs/lib/viewcmyk.ps | 2 +- Master/tlpkg/tlgs/lib/viewgif.ps | 2 +- Master/tlpkg/tlgs/lib/viewmiff.ps | 2 +- Master/tlpkg/tlgs/lib/viewpbm.ps | 2 +- Master/tlpkg/tlgs/lib/viewpcx.ps | 2 +- Master/tlpkg/tlgs/lib/viewps2a.ps | 2 +- Master/tlpkg/tlgs/lib/viewpwg.ps | 2 +- Master/tlpkg/tlgs/lib/viewraw.ps | 2 +- Master/tlpkg/tlgs/lib/viewrgb.ps | 2 +- Master/tlpkg/tlgs/lib/winmaps.ps | 2 +- Master/tlpkg/tlgs/lib/zeroline.ps | 2 +- Master/tlpkg/tlgs/lib/zugferd.ps | 316 ------------- 128 files changed, 402 insertions(+), 1463 deletions(-) create mode 100644 Master/source/ghostscript-9.53.3.tar.xz delete mode 100644 Master/source/ghostscript-9.54.0.tar.xz delete mode 100644 Master/tlpkg/tlgs/Resource/IdiomSet/PPI_CUtils delete mode 100644 Master/tlpkg/tlgs/lib/gs_css_e.ps delete mode 100644 Master/tlpkg/tlgs/lib/zugferd.ps diff --git a/Master/source/ghostscript-9.53.3.tar.xz b/Master/source/ghostscript-9.53.3.tar.xz new file mode 100644 index 00000000000..a5e23fab9ed Binary files /dev/null and b/Master/source/ghostscript-9.53.3.tar.xz differ diff --git a/Master/source/ghostscript-9.54.0.tar.xz b/Master/source/ghostscript-9.54.0.tar.xz deleted file mode 100644 index 1ff034bdb02..00000000000 Binary files a/Master/source/ghostscript-9.54.0.tar.xz and /dev/null differ diff --git a/Master/tlpkg/tlgs/README.TEXLIVE b/Master/tlpkg/tlgs/README.TEXLIVE index 222509d96e4..26ca843b795 100644 --- a/Master/tlpkg/tlgs/README.TEXLIVE +++ b/Master/tlpkg/tlgs/README.TEXLIVE @@ -1,12 +1,12 @@ -This directory contains a subset of the Ghostscript 9.54.0 distribution +This directory contains a subset of the Ghostscript 9.53.3 distribution for Windows. The only purpose of this package is to support programs shipped with TeX Live. It's not intended for general use. Changes: * The directories "doc", "examples", "libpng", "trio", "zlib", - "openjpeg", lcms2{art,mt}", and "tesseract" were removed. + "openjpeg", and "lcms2{art,mt}" were removed. * All executable files except Ghostscript itself were removed. diff --git a/Master/tlpkg/tlgs/Resource/CIDFont/ArtifexBullet b/Master/tlpkg/tlgs/Resource/CIDFont/ArtifexBullet index 268d518f248..18c98f16758 100644 Binary files a/Master/tlpkg/tlgs/Resource/CIDFont/ArtifexBullet and b/Master/tlpkg/tlgs/Resource/CIDFont/ArtifexBullet differ diff --git a/Master/tlpkg/tlgs/Resource/CMap/Identity-UTF16-H b/Master/tlpkg/tlgs/Resource/CMap/Identity-UTF16-H index 5c1c3eac92b..a47413aa276 100644 --- a/Master/tlpkg/tlgs/Resource/CMap/Identity-UTF16-H +++ b/Master/tlpkg/tlgs/Resource/CMap/Identity-UTF16-H @@ -1,4 +1,4 @@ -% Copyright (C) 2003-2021 Artifex Software. All rights reserved. +% Copyright (C) 2003-2018 Artifex Software. All rights reserved. % % This software is provided AS-IS with no warranty, either express or % implied. diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultCMYK b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultCMYK index f3d7182350a..cba9326c204 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultCMYK +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultCMYK @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultGray b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultGray index 21a72fd634e..95c9ef41e81 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultGray +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultGray @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultRGB b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultRGB index d715587b994..53ddf3eac75 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultRGB +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/DefaultRGB @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/TrivialCMYK b/Master/tlpkg/tlgs/Resource/ColorSpace/TrivialCMYK index 66776bcde96..b3dec8b89a0 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/TrivialCMYK +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/TrivialCMYK @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/sGray b/Master/tlpkg/tlgs/Resource/ColorSpace/sGray index 501ed376b44..a0997d0b844 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/sGray +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/sGray @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/ColorSpace/sRGB b/Master/tlpkg/tlgs/Resource/ColorSpace/sRGB index 0aadbc01a51..16f3ecfad4e 100644 --- a/Master/tlpkg/tlgs/Resource/ColorSpace/sRGB +++ b/Master/tlpkg/tlgs/Resource/ColorSpace/sRGB @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Dingbats b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Dingbats index 76cd6d1a435..8da04509b25 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Dingbats +++ b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Dingbats @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Symbol b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Symbol index 4c2dcecb645..c9411a038cb 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Symbol +++ b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Symbol @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Unicode b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Unicode index acc8e0229c6..4cdf58a5764 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Unicode +++ b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Unicode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Wingdings b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Wingdings index 2eaca0df36e..a31cefd8eed 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/FCO_Wingdings +++ b/Master/tlpkg/tlgs/Resource/Decoding/FCO_Wingdings @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/Latin1 b/Master/tlpkg/tlgs/Resource/Decoding/Latin1 index b9dff0f3d76..8960ab4f5b1 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/Latin1 +++ b/Master/tlpkg/tlgs/Resource/Decoding/Latin1 @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/StandardEncoding b/Master/tlpkg/tlgs/Resource/Decoding/StandardEncoding index 5ac6d63c09a..f2b27a56609 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/StandardEncoding +++ b/Master/tlpkg/tlgs/Resource/Decoding/StandardEncoding @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Decoding/Unicode b/Master/tlpkg/tlgs/Resource/Decoding/Unicode index dfc137d9272..7ecd3069cb0 100644 --- a/Master/tlpkg/tlgs/Resource/Decoding/Unicode +++ b/Master/tlpkg/tlgs/Resource/Decoding/Unicode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Encoding/CEEncoding b/Master/tlpkg/tlgs/Resource/Encoding/CEEncoding index b2d7e574eed..bd3f8abb682 100644 --- a/Master/tlpkg/tlgs/Resource/Encoding/CEEncoding +++ b/Master/tlpkg/tlgs/Resource/Encoding/CEEncoding @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Encoding/ExpertEncoding b/Master/tlpkg/tlgs/Resource/Encoding/ExpertEncoding index 97b33213e9e..fe879bda371 100644 --- a/Master/tlpkg/tlgs/Resource/Encoding/ExpertEncoding +++ b/Master/tlpkg/tlgs/Resource/Encoding/ExpertEncoding @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Encoding/ExpertSubsetEncoding b/Master/tlpkg/tlgs/Resource/Encoding/ExpertSubsetEncoding index 6177adb0328..6f789bc50ca 100644 --- a/Master/tlpkg/tlgs/Resource/Encoding/ExpertSubsetEncoding +++ b/Master/tlpkg/tlgs/Resource/Encoding/ExpertSubsetEncoding @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Encoding/NotDefEncoding b/Master/tlpkg/tlgs/Resource/Encoding/NotDefEncoding index 0c810e48c46..a5e0b8d3b75 100644 --- a/Master/tlpkg/tlgs/Resource/Encoding/NotDefEncoding +++ b/Master/tlpkg/tlgs/Resource/Encoding/NotDefEncoding @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Encoding/Wingdings b/Master/tlpkg/tlgs/Resource/Encoding/Wingdings index efb7d3fa500..4a245571185 100644 --- a/Master/tlpkg/tlgs/Resource/Encoding/Wingdings +++ b/Master/tlpkg/tlgs/Resource/Encoding/Wingdings @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/IdiomSet/PPI_CUtils b/Master/tlpkg/tlgs/Resource/IdiomSet/PPI_CUtils deleted file mode 100644 index 7e6ecb23ea2..00000000000 --- a/Master/tlpkg/tlgs/Resource/IdiomSet/PPI_CUtils +++ /dev/null @@ -1,24 +0,0 @@ -%% -%% Idioms for the PPI Media GmbH PPI_ColorUtils ProcSet -%% This appears to be a kind of desktop colour separation utility. If it is -%% used with the pdfwrite PassThroughJPEGImages feature then instead of -%% converting images from colour to gray, we embed the colour image data -%% but with a DeviceGray colour space, which leads to incorrect output. -%% To fix that, turn off the feature if cuForceGray is set to true. This -%% is the first time we've seen this, and more work may be required. -%% - -currentuserparams /IdiomRecognition get -<> setuserparams - -/PPI_CUtils -<< -/cuForceGray [ -{/_cuForceGray exch cuPut} bind -{dup //true eq {currentdevice //null //false mark /PassThroughJPEGImages //false .putdeviceparamsonly}if /_cuForceGray exch cuPut} bind -] ->> - -/IdiomSet defineresource pop - -<> setuserparams diff --git a/Master/tlpkg/tlgs/Resource/Init/FCOfontmap-PCLPS2 b/Master/tlpkg/tlgs/Resource/Init/FCOfontmap-PCLPS2 index e51db629fcc..91bd8f7fa26 100644 --- a/Master/tlpkg/tlgs/Resource/Init/FCOfontmap-PCLPS2 +++ b/Master/tlpkg/tlgs/Resource/Init/FCOfontmap-PCLPS2 @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_agl.ps b/Master/tlpkg/tlgs/Resource/Init/gs_agl.ps index ce5ea1ce06a..9c1c52d2afb 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_agl.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_agl.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_btokn.ps b/Master/tlpkg/tlgs/Resource/Init/gs_btokn.ps index 1f63fb5c4e0..410b8419154 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_btokn.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_btokn.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps index 43cf7d0193f..6cfa1ec1323 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cff.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cidcm.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cidcm.ps index 1ec03b3632a..503ec867fbf 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cidcm.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cidcm.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_ciddc.ps b/Master/tlpkg/tlgs/Resource/Init/gs_ciddc.ps index 9e2ea1ead74..6cdba039084 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_ciddc.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_ciddc.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cidfm.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cidfm.ps index 1a456ab1dfc..f22e45d6d63 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cidfm.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cidfm.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps index 870a2e11c65..20af1c875df 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cidfn.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cidtt.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cidtt.ps index b856ba65b26..e045cfddc61 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cidtt.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cidtt.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cmap.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cmap.ps index 0c2e1421565..3252089ad07 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cmap.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cmap.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_cspace.ps b/Master/tlpkg/tlgs/Resource/Init/gs_cspace.ps index c005cef4282..8aaf6b74b13 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_cspace.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_cspace.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_dbt_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_dbt_e.ps index 89e24131bad..2aca0c68a39 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_dbt_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_dbt_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_diskn.ps b/Master/tlpkg/tlgs/Resource/Init/gs_diskn.ps index 825ff8d959c..85ff07e3748 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_diskn.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_diskn.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_dps1.ps b/Master/tlpkg/tlgs/Resource/Init/gs_dps1.ps index ba5b9b54e36..14cc5d6d849 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_dps1.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_dps1.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_dps2.ps b/Master/tlpkg/tlgs/Resource/Init/gs_dps2.ps index 0320644667e..2dfaaa49865 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_dps2.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_dps2.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_dscp.ps b/Master/tlpkg/tlgs/Resource/Init/gs_dscp.ps index 4ea3d4540f1..15764b1772a 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_dscp.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_dscp.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps b/Master/tlpkg/tlgs/Resource/Init/gs_epsf.ps index 47b68bba9be..cf020751a08 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-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -29,7 +29,6 @@ % After %%HiResBoundingBox processed, state is 3 if OK or 4 if cropped. % After %%EndComments processed, state is 5. /EPSBoundingBoxState 5 def -/EPSBoundingBoxString () def % set if either BoundingBox is seen (even if invalid) /EPSBoundingBoxSetState { //systemdict /EPSBoundingBoxState 3 -1 roll .forceput } .bind executeonly odef % .forceput must be bound and hidden @@ -61,10 +60,7 @@ /EPSBoundingBoxFitPage { % llx lly urx ury -- EPSDEBUG { (gs_epsf.ps: Rescaling EPS to fit page\n) print flush } if clippath pathbbox newpath % ellx elly eurx eury pllx plly purx pury - EPSDEBUG { - (Page Coordinates: LLX: ) print 3 index =print (, LLY: ) print - 2 index =print (, URX: ) print 1 index =print (, URY: ) print dup = flush - } if + % Convert box corners to coordinates of the center and box sizes 2 { % loop doing the page coordinates, the the EPS bbox coordinates 3 -1 roll exch % ... llx urx lly ury @@ -86,19 +82,7 @@ % Find orientation of the best fit. Square pages or files don't rotate. 2 copy sub % edx ecx edy ecy pdx pdy pdx-pdy - EPSDEBUG { - (pdx: ) print 2 index =print (, pdy: ) print 1 index =print - (, pdx-pdy: ) print dup = flush - } if - 6 index 5 index sub - EPSDEBUG { - (edx: ) print 7 index =print (, edy: ) print 5 index =print - (, edx-edy: ) print dup = flush - } if - mul % edx ecx edy ecy pdx pdy (pdx-pdy)*(edx-edy) - EPSDEBUG { - (product: ) print dup = flush - } if + 6 index 5 index sub mul % edx ecx edy ecy pdx pdy (pdx-pdy)*(edx-edy) 0 lt { 90 rotate exch @@ -116,17 +100,15 @@ } bind executeonly odef /EPSBoundingBoxProcess { % (llx lly urx ury) state -- - % The following 'lt' check prioritzies HiResBoundingBox over BoundingBox - % 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 //systemdict /EPSBoundingBoxString 3 -1 roll .forceput - EPSBoundingBoxParse + exch EPSBoundingBoxParse { //systemdict /EPSCrop known { EPSBoundingBoxCrop } { - //systemdict /EPSFitPage known not { + //systemdict /EPSFitPage known { + EPSBoundingBoxFitPage + } { % Warn if some of the EPS file will be clipped clippath pathbbox newpath { % context for exit @@ -142,17 +124,10 @@ flush 1 add } if - } { - pop pop pop pop } ifelse } ifelse EPSBoundingBoxSetState } { - % improperly formed BoundingBox string. - QUIET not { - (\n **** Warning: BoundingBox values are invalid and will be ignored: ') print - EPSBoundBoxString print (') = flush - } if pop % state } ifelse } { @@ -160,25 +135,6 @@ } ifelse } bind executeonly odef -% Perform anchorsearch on the strings in the array until a match is found. -/anchorsearchforany { % haystack [needle1 ...] --> post needle true - % --> haystack false - false 3 1 roll % false haystack [...] - { % false haystack needle - dup 3 1 roll % false needle haystack needle - anchorsearch { - % false needle post needle - pop % false needle post - 3 1 roll % post false needle - exch not exch % post true needle - exit - } { - % false needle haystack - exch pop % false haystack - } ifelse - } forall - exch % haystack false | post needle true -} bind def /ProcessEPSComment { % file comment -- file comment /EPSBoundingBoxState .systemvar 3 lt { @@ -232,23 +188,12 @@ } ifelse } ifelse } { - {(%%EndComments) (%%BeginProlog) (%%BeginSetup)} anchorsearchforany { - EPSDEBUG { (EPSComment processing finished, encountered: ) print dup = } if - pop pop % discard the strings from the anchorsearch - % We may have seen BoundingBox or HiResBounfingBox. If so and if EPSFitPage - % is set, then we do the transformation here to scale and center the page, - % rotating if needed (and AllowFitPageRotation is true -- the default.) - //systemdict /EPSFitPage known - //systemdict /EPSBoundingBoxState get 0 gt - and { - EPSBoundingBoxString EPSBoundingBoxParse { - EPSBoundingBoxFitPage - } if - } if + (%%EndComments) anchorsearch { + pop pop % Ignore any following comments 5 EPSBoundingBoxSetState } { - pop % Not %%EndComments -- ignore it + pop } ifelse } ifelse } if @@ -365,7 +310,6 @@ end /.runnoepsf /.runEPS /EPSBoundingBoxSetState - /EPSBoundingBoxString /EPSBoundingBoxCrop /EPSBoundingBoxFitPage /EPSBoundingBoxParse diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_fapi.ps b/Master/tlpkg/tlgs/Resource/Init/gs_fapi.ps index b0f748209d6..0b493c6a516 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_fapi.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_fapi.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_fntem.ps b/Master/tlpkg/tlgs/Resource/Init/gs_fntem.ps index 8904352deb2..d5ac0bfa72f 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_fntem.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_fntem.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps b/Master/tlpkg/tlgs/Resource/Init/gs_fonts.ps index f1e26b09393..3f4f4af8066 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-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps b/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps index 80d399101b7..74c1dd27788 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_frsd.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -61,29 +61,13 @@ level2dict begin .currentglobal 1 index gcheck .setglobal exch currentpacking //false setpacking exch - 2 dict begin /filelen 0 def % scratch dict for filelen and pos (below). % Stack: dict filters parms CloseSource oldglobal oldpacking file - [ exch { - dup 40000 string readstring - /filelen 2 index length filelen add def % accumulate filelen - not { exit } if exch - } loop + [ exch { dup 40000 string readstring not { exit } if exch } loop exch pop ] - { filelen string } stopped { % try allocating a single string - pop % couldn't make a string - discard filelen value - } { - % transfer the array-of-strings to the single string. - % stack: ... [() ...] string - /pos 0 def exch { - 1 index exch pos exch putinterval /pos pos 40000 add def - } forall - } ifelse - % top of stack is either array of strings or one string == stream_data - end % done with scratch dict - % Stack: dict filters parms CloseSource oldglobal oldpacking stream_data + % Stack: dict filters parms CloseSource oldglobal oldpacking [()...] 3 1 roll setpacking setglobal - % Stack: dict filters parms CloseSource stream_data + % Stack: dict filters parms CloseSource [()...] 1 index .reusablestream } if % We created the stream successfully: clean up. diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_icc.ps b/Master/tlpkg/tlgs/Resource/Init/gs_icc.ps index 0bf8313fdc4..fac0cb25fab 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_icc.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_icc.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_il1_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_il1_e.ps index 35250233701..f8cfff04ca4 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_il1_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_il1_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_img.ps b/Master/tlpkg/tlgs/Resource/Init/gs_img.ps index 3750ad30285..00d79df34ac 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_img.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_img.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2002-2021 Artifex, Inc. All rights reserved. +% Copyright (C) 2002-2018 Artifex, Inc. All rights reserved. % % This software is provided AS-IS with no warranty, either express or % implied. diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_init.ps b/Master/tlpkg/tlgs/Resource/Init/gs_init.ps index 088c8583e3e..931f91aaadd 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-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 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! -9540 +9533 % Check the interpreter revision. dup revision ne @@ -144,8 +144,7 @@ currentdict /PDFNOCIDFALLBACK known /PDFNOCIDFALLBACK exch def currentdict /BATCH known /BATCH exch def currentdict /DELAYBIND known /DELAYBIND exch def -currentdict /DOINTERPOLATE .knownget { { -1 } { 1 } ifelse /InterpolateControl exch def } if -currentdict /NOINTERPOLATE .knownget { { 0 } { 1 } ifelse /InterpolateControl exch def } if +currentdict /DOINTERPOLATE .knownget { { -1 } { 0 } ifelse /InterpolateControl exch def } if currentdict /ESTACKPRINT known /ESTACKPRINT exch def currentdict /FAKEFONTS known /FAKEFONTS exch def currentdict /FIXEDMEDIA known /FIXEDMEDIA exch def @@ -160,6 +159,7 @@ currentdict /NODISPLAY known not /DISPLAYING exch def currentdict /NOFONTMAP known /NOFONTMAP exch def currentdict /NOFONTPATH known /NOFONTPATH exch def currentdict /NOGC known /NOGC exch def +currentdict /NOINTERPOLATE .knownget { /InterpolateControl 0 def } if currentdict /NOMEDIAATTRS known /NOMEDIAATTRS exch def currentdict /NOOUTERSAVE known /NOOUTERSAVE exch def currentdict /NOPAGEPROMPT known /NOPAGEPROMPT exch def @@ -215,13 +215,6 @@ currentdict /EPSFitPage known { /PSFitPage //true def } if % This is a "convenience" option that sets a combination of EPSFitPage, PDFFitPage and PSFitPage currentdict /FitPage known { /EPSFitPage //true def /PDFFitPage //true def /PSFitPage //true def } if -currentdict /SimulateOverprint known { - (\n**** -dSimulateOverprint={true|false} is no longer supported. ****\n) print - (**** It has been replaced by -dOverprint={enable|disable|simulate} ****\n\n) print - % Set the new variable appropriately. - /Overprint SimulateOverprint { /enable } { /disable } ifelse def -} if - % Acquire environment variables. currentdict /DEVICE known not { (GS_DEVICE) getenv { /DEVICE exch def } if } if diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_lev2.ps b/Master/tlpkg/tlgs/Resource/Init/gs_lev2.ps index 54849370d5c..fefa732b198 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_lev2.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_lev2.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_ll3.ps b/Master/tlpkg/tlgs/Resource/Init/gs_ll3.ps index 98e2a65fb5f..f6d98482164 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_ll3.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_ll3.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_mex_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_mex_e.ps index cced43b3d11..dda0675cd85 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_mex_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_mex_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_mgl_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_mgl_e.ps index b437285b7d9..e02729b1c9a 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_mgl_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_mgl_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_mro_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_mro_e.ps index e476322ba39..7d0e3b7c284 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_mro_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_mro_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_pdf_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_pdf_e.ps index 2d3ec9ffc05..172cd72c559 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_pdf_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_pdf_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_pdfwr.ps b/Master/tlpkg/tlgs/Resource/Init/gs_pdfwr.ps index 9386339b0ac..a53b8c3f88e 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_pdfwr.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_pdfwr.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -278,6 +278,19 @@ languagelevel 2 .setlanguagelevel % ---------------- End of predefined configurations ---------------- % +% Set optimizations for converting PostScript to PDF. +% The ps2pdf* scripts invoke this. +/.setpdfwrite { % - .setpdfwrite - + % Set a large VM threshold to reduce garbage collection. + (\n**** WARNING: The .setpdfwrite operator has been deprecated and will be removed entirely\n) print + ( in the next release of Ghostscript. The functionality of this operator has\n) print + ( been reduced to increasing the size of the VM threshold. If you believe you\n) print + ( have a real need for this then you should replace your call to .setpdfwrite\n) print + ( with:\n\n) print + ( 3000000 setvmthreshold\n\n) print + currentuserparams /VMThreshold get 3000000 .max setvmthreshold +} bind def + % ---------------- pdfmark and DSC processing ---------------- % /.write_small_positive_real % .write_small_positive_real - diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_res.ps b/Master/tlpkg/tlgs/Resource/Init/gs_res.ps index 41214bf358b..18f63a30064 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_res.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_res.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_resmp.ps b/Master/tlpkg/tlgs/Resource/Init/gs_resmp.ps index a7eb70fcafe..5ba4f43e760 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_resmp.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_resmp.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_setpd.ps b/Master/tlpkg/tlgs/Resource/Init/gs_setpd.ps index 2a333bf7642..51b26899979 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_setpd.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_setpd.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_statd.ps b/Master/tlpkg/tlgs/Resource/Init/gs_statd.ps index 8f01c78c4c1..7b85ef0f558 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_statd.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_statd.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_std_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_std_e.ps index c696b714fc7..4bfa6c5bfcb 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_std_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_std_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_sym_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_sym_e.ps index e6c58f6fa5c..fb92a2997dd 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_sym_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_sym_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_trap.ps b/Master/tlpkg/tlgs/Resource/Init/gs_trap.ps index 9a089eef737..e4d6cafe094 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_trap.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_trap.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps b/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps index 95d50c6be60..394cba28e26 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_ttf.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -414,16 +414,7 @@ pop /firstcode startc 0 getu16a 16#ff00 and dup 16#f000 ne { pop 0 } if def /putglyph { - glyphs code known - { - glyphs /.cmap_warning_issued known not { - (**** Warning: Invalid TTF cmap mapping (overlapping/repeated map)\n) print flush - glyphs /.cmap_warning_issued //true put - } if - pop - } - {glyphs code 3 -1 roll put}ifelse - /code code 1 add def + glyphs code 3 -1 roll put /code code 1 add def } bind def /glyphs 0 dict def @@ -447,10 +438,6 @@ % Two choices are: drop later repeated/overlapping segments entirely, % or only use codes from later, overlapping segments not already set % by the earlier segment. (Inspired by Bug 700968). - % Revision: bug 703589 has an (invalid) cmap table with overlapping - % (actually repeating) ranges, and requires the *first* range definition - % to be used in order to render correctly. So /putglyph now refuses to - % overwrite existing keys in the "glyphs" dictionary 0 2 nseg2 dup 4 lt {pop 4}if 3 sub { /i2 exch def /scode startc i2 getu16a def @@ -477,10 +464,7 @@ } for } ifelse } if - } for - % If we've encoutered an invalid table, remove the key before returning - glyphs /.cmap_warning_issued undef - glyphs /glyphs //null def % for GC + } for glyphs /glyphs //null def % for GC } .bind 6 { % Single interval lookup. dup 6 getu16a /firstcode exch def diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_typ32.ps b/Master/tlpkg/tlgs/Resource/Init/gs_typ32.ps index 4c2035c70ad..2d5fc81499a 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_typ32.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_typ32.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_typ42.ps b/Master/tlpkg/tlgs/Resource/Init/gs_typ42.ps index a3bb97952c7..654a268c0e0 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_typ42.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_typ42.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps b/Master/tlpkg/tlgs/Resource/Init/gs_type1.ps index fa3cdd8826e..18488ebe1cd 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-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/gs_wan_e.ps b/Master/tlpkg/tlgs/Resource/Init/gs_wan_e.ps index fe821352936..5d3673cc67a 100644 --- a/Master/tlpkg/tlgs/Resource/Init/gs_wan_e.ps +++ b/Master/tlpkg/tlgs/Resource/Init/gs_wan_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps index 2453b6bc1d3..1e7bd701bbc 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_base.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -779,19 +779,17 @@ currentdict /token_nofail_dict .undef % Read the data for all objects. We check to see if we get % the number of objects that we expect. % Stack: strm# objstreamdict N objectstream [obj#] PDFDEBUG - /ResolveObjectStreamMark 3 -1 roll + mark 3 -1 roll % Get objectstream count 4 index add % Determine stack depth with objects 3 1 roll resolveobjstreamopdict .pdfrun % Get PDF objects - count /ResolveObjectStreamMark CountToKey not {0} if - 1 add index - ne + count counttomark 1 add index ne { - count /ResolveObjectStreamMark CountToKey not {0} if - 1 add index gt { + count counttomark 1 add index gt { ( **** Error: Incorrect object count in object stream (too many objects).\n) pdfformaterror ( Output may be incorrect.\n) pdfformaterror } if + % Its possible for us to end up here with a valid file. The way we work is to read the % stream and tokenise all the objects, but that assumes there will be delimiters or % whitespace between each object in the stream. We can easily think of cases where @@ -823,13 +821,13 @@ currentdict /token_nofail_dict .undef % the stack, in the right order, preceded by a mark, a count, and an array containing % all the object numbers. - % First, discard everything we read up to now; we can reuse the 'mark' which was placed - % by the preceding code to do this, as long as we remember to replace that 'mark'. + % First, discard everything we read up to now; we can reuse the mark which was placed + % by the preceding code to do this, as long as we remember to replace that mark. % Handily this will leave the count and the array which contains the object numbers in place. - /ResolveObjectStreamMark ClearToKey + cleartomark - % Replace the 'mark' consumed by conttomark above, so that we match what the code following this error handling expects. - /ResolveObjectStreamMark + % Replace the mark consumed by conttomark above, so that we match what the code following this error handling expects. + mark % copy the ObjStm dictionary and then copy the count of objects expected 4 index 4 index @@ -896,15 +894,14 @@ currentdict /token_nofail_dict .undef % but leave count of objects. Check that aginst the number of objects % retrieved. If we got too few then issue a warning. - pop pop exch pop /ResolveObjectStreamMark CountToKey not {1} if - 1 sub lt { + pop pop exch pop counttomark 1 sub lt { ( **** Error: Incorrect object count in object stream (too few objects).\n) pdfformaterror ( Output may be incorrect.\n) pdfformaterror } if } if % We have the object data - /ResolveObjectStreamMark CountToKey not {0} if array astore + counttomark array astore % Put objects into an array exch pop exch pop % Remove mark and count currentdict //no_debug_dict eq { end } if % Restore debug context % Save the objects into Objects @@ -1093,30 +1090,15 @@ currentdict /no_debug_dict undef % Some (bad) PDf files have invalid stream lengths. This causes problems % if we reposition beyond the end of the file. So we compare the given % length to number of bytes left in the file. - dup mark exch /Length {knownoget} stopped { - % Bug 703372 is a PDF file where the XRef stream dictionary has a Length which is an - % indirect object. Clearly we cannot look that up in an xref which we haevn't yet - % read! We catch the error from knownoget and do not reposition the steam. After - % that the normal recovery code kicks in and we will eventually manage to read - % the compressed xref. - cleartomark - } - { - { - dup type /realtype eq { - ( **** Warning: stream length is a real number; converting to integer.\n) pdfformatwarning - cvi 2 copy /Length exch put - } if - dup PDFfile bytesavailable lt { % compare to to bytes left in file - PDFfile fileposition % reposition to the end of stream - add PDFfile exch setfileposition - } { - pop % bad stream length - do not reposition. - % This will force a length warning below - } ifelse - } if - pop % the mark from the Length dereference guard above. - } ifelse + dup /Length knownoget { + dup PDFfile bytesavailable lt { % compare to to bytes left in file + PDFfile fileposition % reposition to the end of stream + add PDFfile exch setfileposition + } { + pop % bad stream length - do not reposition. + % This will force a length warning below + } ifelse + } if } { pop % We're already reading from a stream, which we can't reposition. diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps index 8527312c10c..a93a526ca85 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_draw.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -762,24 +762,6 @@ def .pdfruncontext end grestore - - % check for extra garbage on the operand stack and clean it up - count pdfemptycount sub dup 0 ne { - ( **** Error: Transparency Group, Form XObject execution corrupted the stack.\n) pdfformaterror - ( Output may be incorrect.\n) pdfformaterror - PDFSTOPONERROR { - /.execgroup cvx /rangecheck signalerror - } { - dup 0 gt { - { pop } repeat - }{ - pop - } ifelse - } ifelse - } { - pop - } ifelse - /pdfemptycount exch store } bind executeonly def @@ -814,22 +796,12 @@ def %% as arguments to .execgroup mark currentcolor counttomark array astore exch pop currentcolorspace 5 2 roll - dup /Group oget dup type /dicttype eq { - exch /BBox oget dup type /arraytype eq { + + dup /Group oget exch /BBox oget % Stack: resdict stream groupdict bbox - .beginformgroup - .execgroup - .endtransparencygroup - }{ - ( **** Error: Form XObject has a BBox entry with an invalid type.\n) pdfformaterror - ( Ignoring transparency Group, output may be incorrect.\n) pdfformaterror - pop pop pop pop pop pop - } ifelse - } { - ( **** Error: Form XObject has a Group entry with an invalid type.\n) pdfformaterror - ( Ignoring transparency Group, output may be incorrect.\n) pdfformaterror - pop pop pop pop pop pop - } ifelse + .beginformgroup + .execgroup + .endtransparencygroup } bind executeonly def % Make an ImageType 103 (soft-masked) image. @@ -2197,15 +2169,7 @@ currentdict /last-ditch-bpc-csp undef ( Output may be incorrect.\n) pdfformaterror } ifelse } if - 1 index /Mask knownoget { - dup type dup /dicttype eq exch /arraytype eq or { % Bug #703681 - 1 index exch /Mask exch put - } { - pop - ( **** Error: Ignoring Mask attribute that is not an array or a dictionary.\n) - pdfformaterror - } ifelse - } if + 1 index /Mask knownoget { 1 index exch /Mask exch put } if makeimagedict doimagesmask } bind executeonly def /makemaskimage { % makemaskimage @@ -2323,14 +2287,6 @@ currentdict /last-ditch-bpc-csp undef currentdict /SMask knownoget { % We are doing transparency and SMask is present in the image % stack: - % Normalize /Matte attribute for .begintransparencymaskimage - dup /Matte .knownget { - oforce dup //null eq { - pop dup /Matte undef - } { - 1 index /Matte [ 4 -1 roll { oforce } forall ] put - } ifelse - } if .begintransparencymaskimage PDFfile fileposition exch gsave //nodict begin @@ -2352,12 +2308,6 @@ currentdict /last-ditch-bpc-csp undef % code only picks up the current colour space, not the space from the dictionary. currentdict /SMask get /Matte known {/CS currentdict /ColorSpace get dup pdfopdict /cs get exec } if >> 0 0 1 1 - gsave 1 1 moveto 0 0 lineto - % If we get an error, just emit an empty box - { pathbbox } stopped { 0 0 0 0 } if - 4 array astore grestore - /image - setup_trans .begintransparencygroup .currentstrokeconstantalpha .currentfillconstantalpha 3 -1 roll 1 .setfillconstantalpha 1 .setstrokeconstantalpha @@ -2459,6 +2409,12 @@ currentdict /last-ditch-bpc-csp undef makemaskimage } if % Stack: datasource imagemask + gsave 1 1 moveto 0 0 lineto + % If we get an error, just emit an empty box + { pathbbox } stopped { 0 0 0 0 } if + 4 array astore grestore + /image + setup_trans { currentdict end setsmaskstate //true ValidateDecode { imagemask } } { ColorSpace setgcolorspace currentdict end setsmaskstate //false ValidateDecode { image } } ifelse @@ -3052,12 +3008,6 @@ drawopdict begin /File PDFsource def currentdict makeimagekeys OFFlevels length 0 eq { - gsave 1 1 moveto 0 0 lineto - % If we get an error, just emit an empty box - { pathbbox } stopped { 0 0 0 0 } if - 4 array astore grestore - /image - setup_trans doimage } { pop Width @@ -4302,7 +4252,7 @@ currentdict /set_bc_color undef dup annotsetcolor { dup drawborder dup calc_annot_scale 2 copy mul 0 ne - {3 -1 roll drawwidget} + {3 -1 roll drawwidget //false} { pop pop ( **** Error: ignoring annotation with scale factor of 0\n) pdfformaterror @@ -4310,7 +4260,6 @@ currentdict /set_bc_color undef }ifelse } if //endannottransparency exec - //false } bind executeonly def /Ink { % -> @@ -5410,9 +5359,14 @@ currentdict /drawannottypes undef /Ink {mark exch loadannot /ANN pdfmark //false} bind executeonly def -/PolyLine {mark exch loadannot /ANN pdfmark //false} bind executeonly def - -/Line {mark exch loadannot /ANN pdfmark //false} bind executeonly def +/Line { + mark exch dup /L .knownget { + aload 5 1 roll transform 4 -2 roll transform 4 2 roll + 5 -1 roll astore + 1 index /L 3 -1 roll put + } if + loadannot /ANN pdfmark //false +} bind executeonly def /Link { /NO_PDFMARK_DESTS where {pop NO_PDFMARK_DESTS not}{//true}ifelse @@ -5502,8 +5456,7 @@ currentdict /drawannottypes undef //false } bind executeonly def -%% We don't handle movies correctly, so don't try to preserve them -%/Movie {mark exch loadannot /ANN pdfmark //false} bind executeonly def +/Movie {mark exch loadannot /ANN pdfmark //false} bind executeonly def /Popup {mark exch loadannot /ANN pdfmark //false} bind executeonly def /Sound {mark exch loadannot /ANN pdfmark //false} bind executeonly def /Square {mark exch loadannot /ANN pdfmark //false} bind executeonly def @@ -5764,25 +5717,22 @@ currentdict end def % The recursive enumeration of the form fields doesn't descend into widget annotations. /draw_form_field { % draw_form_field - - dup type /dicttyype eq { % File for Bug692447 has 'null' Fields entries - % This matches what pdf_main process_trailer_attrs - dup /Kids knownoget { % field [] - dup length 0 gt { - dup 0 oget /Parent knownoget { % field [] kid - pop % mon-terminal field % field [] - exch pop % [] - { oforce draw_form_field } forall - } { - pop draw_terminal_field % separate annots % - - } ifelse + dup /Kids knownoget { % field [] + dup length 0 gt { + dup 0 oget /Parent knownoget { % field [] kid + pop % mon-terminal field % field [] + exch pop % [] + { oforce draw_form_field } forall } { - ( **** Error: Ignoring empty /Kids array in Form field.\n) pdfformaterror - ( Output may be incorrect.\n) pdfformaterror + pop draw_terminal_field % separate annots % - } ifelse } { - draw_terminal_field % merged annotation % - + ( **** Error: Ignoring empty /Kids array in Form field.\n) pdfformaterror + ( Output may be incorrect.\n) pdfformaterror } ifelse - } if + } { + draw_terminal_field % merged annotation % - + } ifelse } bind executeonly def /draw_acro_form { %
draw_acro_form - diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_font.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_font.ps index 699c14fe307..98a9e3d4fea 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_font.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_font.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -1234,23 +1234,6 @@ setglobal { /undef_proc_warning /missing-type1-procs /readonly-op-dict } { currentdict exch undef } forall - % Bug703454.pdf contains a number of fonts with multiple definitions - % of a given glyph name in the CharStrings dict - i.e. two entries - % for /a - the first of which is "correct" the second is "wrong". - % Normal Postscript behaviour replaces the first value with the second - % for the given key/value pair. - % To handle this, *only* for Type 1 fonts embedded in PDFs, we - % have a special definition of "def" which won't overwrite existing - % values in the CharStrings dict. - /def - { - 3 index /CharStrings eq - currentdict 3 index known and - { pstack flush pop pop } - { systemdict /def get exec } - ifelse - } bind executeonly def - end readonly def currentdict /eexec_pdf_param_dict .undef @@ -1498,9 +1481,7 @@ currentdict /eexec_pdf_param_dict .undef } { % filepos fontres stream 1 index /FontDescriptor oget - /Flags oget dup % only believe the symbolic flag if the non-symbolic flag is not also set! - 4 and 0 ne - exch 32 and 0 eq and { + /Flags oget 4 and 0 ne { //true % symbolic } { 1 index /Encoding oknown not % no encoding => symbolic diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps index ded2782a13e..d7933700f73 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_main.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -26,12 +26,10 @@ userdict /GS_PDF_ProcSet undef /#? //false def % Test whether the current output device handles pdfmark. +/.writepdfmarkdict 1 dict dup /pdfmark //null put readonly def /.writepdfmarks { % - .writepdfmarks - /PdfmarkCapable /GetDeviceParam .special_op { - exch pop - }{ - //false - }ifelse + currentdevice //.writepdfmarkdict .getdeviceparams + mark eq { //false } { pop pop //true } ifelse systemdict /DOPDFMARKS known or } bind executeonly def @@ -284,22 +282,12 @@ currentdict /runpdfstring .undef { systemdict /FirstPage known systemdict /LastPage known or - systemdict /PageList known or + systemdict /Pagelist known or { <> setpagedevice } if } bind def -/EnablePageHandlerDevice -{ - systemdict /FirstPage known - systemdict /LastPage known or - systemdict /PageList known or - { - <> setpagedevice - } if -} bind def - /runpdfbegin { % runpdfbegin - userdict begin % It turns out that the PDF interpreter uses memory more @@ -307,22 +295,20 @@ currentdict /runpdfstring .undef % This is counter-intuitive, and we don't understand why it happens, % but the improvement is significant. /PDFTopSave save def - << - /ProcessDSCComment //null - /ProcessComment //null - %% Bug #696487, allow dict stack to grow without limit, as these PDF - %% files have stupidly deep gsave nesting and we need a dictionary per gsave - %% at the moment. - %% Remove ths if bug #696511 is ever completed (move ExtGstate parameters into gstate) - /MaxDictStack -1 - %% Bug #696567, same customer as above. Ths time they have a file with a page whch has - %% 447000 ExtGState references (all of which contain no gstate!) Because we allocate - %% these on the stack, allow the stack to grow indefinitely in order to accomodate - %% such stupid files. Also move these lines from the end of the routine, so that - %% the increases are in place before we call odfopen, which will build the - %% resources and needs this definition in place. - /MaxOpStack -1 - >> setuserparams + <> setuserparams + <> setuserparams + %% Bug #696487, allow dict stack to grow without limit, as these PDF + %% files have stupidly deep gsave nesting and we need a dictionary per gsave + %% at the moment. + %% Remove ths if bug #696511 is ever completed (move ExtGstate parameters into gstate) + <> setuserparams + %% Bug #696567, same customer as above. Ths time they have a file with a page whch has + %% 447000 ExtGState references (all of hwch contain no gstate!) Because we allocate + %% these on the stack, allow the stack to grow indefinitely in order to accomodate + %% such stupid files. Also move these lines from the end of the routine, so that + %% the increases are in place before we call odfopen, which will build the + %% resources and needs this definition in place. + <> setuserparams //DisablePageHandlerDevice exec @@ -337,6 +323,7 @@ currentdict /runpdfstring .undef /CumulativePageCount currentpagedevice /PageCount get def } bind executeonly def +currentdict /DisablePageHandlerDevice undef /runpdfpagerange { % - runpdfpagerange /PortfolioPage where { @@ -388,8 +375,9 @@ currentdict /runpdfstring .undef 2 2 pdfpagecount { PDFPageList exch 1 put } for + 1 pdfpagecount QUIET not { - (Processing even-numbered pages\n) print (1 through ) print pdfpagecount =only + (Processing even-numbered pages\n) print (.) = flush } if } { @@ -401,8 +389,9 @@ currentdict /runpdfstring .undef 1 2 pdfpagecount { PDFPageList exch 1 put } for + 1 pdfpagecount QUIET not { - (Processing odd-numbered pages\n) print (1 through ) print pdfpagecount =only + (Processing odd-numbered pages\n) print 1 index =only ( through ) print dup =only (.) = flush } if } { @@ -536,16 +525,10 @@ currentdict /runpdfstring .undef dup /Page# exch store QUIET not { (Page ) print dup //== exec flush } if pdfgetpage - dup //null ne { - pdfshowpage - } { - PDFSTOPONERROR { - /dopdfpages cvx /syntaxerror signalerror - } { - pop - ( **** Error: Page #) pdfformaterror Page# 10 string cvs pdfformaterror - ( not found.\n) pdfformaterror - } ifelse + dup //null ne { pdfshowpage } { + ( **** Error: Page #) pdfformaterror Page# 10 string cvs pdfformaterror + ( not found.\n) pdfformaterror + /dopdfpages cvx /syntaxerror signalerror } ifelse }{ pop @@ -571,12 +554,9 @@ currentdict /runpdfstring .undef PDFTopSave restore end % userdict 2 vmreclaim % couldn't hurt - //EnablePageHandlerDevice exec + <> setpagedevice } bind executeonly def -currentdict /DisablePageHandlerDevice undef -currentdict /EnablePageHandlerDevice undef - % Copy stream to an external temporary file and % return the file name as PS name. /copy_embedded_file { @@ -910,25 +890,7 @@ pdfdict begin { % xref line tag was not /n /f ne % verify that the tag was /f { /setxrefentry cvx /syntaxerror signalerror - } { - % Bug #703214 has a invalid initial xref table. The table entries are correct - % but the subsection begins 1 7 instead of 0 7, which means the initial entry is - % declared as object 1 instead of object 0. The file is incrementally updated - % many times and every object *except* object 1 is redefined. Object 1 is - % therefore defined as free and having an offset of 0. Acrobat can open this - % without complaint! Because the PDF header is a comment line it is skipped - % so Acrobat must simply be ignoring the free flag. We can't easily detect - % this, but we can check for the generation number being the canonical - % head of the free list. If it is, and the object number we have is not - % zero, then pretend its not free....... - dup 65535 eq { - 2 index 0 ne { - 0 3 1 roll - //false setxrefentry - 3 -1 roll pop - } if - }if - }ifelse + } if } ifelse pop pop % pop and % stack: @@ -1292,26 +1254,26 @@ currentdict /xref-char-dict undef % to the parent field. Trailer /Root knownoget { /AcroForm knownoget { - %% If we don't have a NeedAppearances entry, treat as if true. - %% We know Acrobat always regenerates all annotations. - dup /NeedAppearances knownoget not { //true } if { - /NeedAppearances //true def - dup - /Fields knownoget { - { oforce - %% Make sure the entry from the Fields array is a dictionary - %% Bug #692447.pdf has an array of nulls. - dup type /dicttype eq { - link_widget_annots - }if - pop - } forall - } if - pop - } { - pop - } ifelse - } if + %% If we don't have a NeedAppearances entry, treat as if true. + %% We know Acrobat always regenerates all annotait + dup /NeedAppearances knownoget not { //true } if { + /NeedAppearances //true def + dup + /Fields knownoget { + { oforce + %% Make sure the entry from the Fields array is a dictionary + %% Bug #692447.pdf has an array of nulls. + dup type /dicttype eq { + link_widget_annots + }if + pop + } forall + } if + pop + } { + pop + } ifelse + } if } if % Use OutputIntent ICC profile @@ -1465,15 +1427,14 @@ currentdict /xref-char-dict undef % Guess whether the output device is a printer. /Printed currentpagedevice /OutputFile known def } ifelse - % If the file name has an odd number of '%', it is either a request for - % separate pages, or is invalid. In either case some marks can be omitted. - currentpagedevice /OutputFile .knownget { - //false exch { - 37 eq xor - } forall { + currentpagedevice /OutputFile known { + currentpagedevice /OutputFile get (%d) search { + pop pop pop /NO_PDFMARK_OUTLINES //true def /NO_PDFMARK_DESTS //true def - } if + } { + pop + }ifelse } if /PSLevel1 where { pop } { /PSLevel1 //false def } ifelse % NB: PDFfile is used outside of the PDF code to determine that a @@ -1618,9 +1579,10 @@ currentdict /xref-char-dict undef % Check for recursion in the page tree. Bug 689954, MOAB-06-01-2007 % Make sure that the operand stack is cleaned up in case there's % an error and we ignore it (bug #700953) - /StackMarkVerifyPageTree + mark verify_page_tree - /StackMarkVerifyPageTree ClearToKey + cleartomark + currentdict end } bind executeonly def @@ -1961,6 +1923,7 @@ currentdict /xref-char-dict undef }ifelse }{ % No Page Resources, recursively try ParentResources as a last resort + pop % page Resources LocalResources parent_obj_get } ifelse } { @@ -2008,8 +1971,7 @@ currentdict /xref-char-dict undef % Get the total number of pages in the document. /pdfpagecount % - pdfpagecount - { - Trailer /Root knownoget { + { Trailer /Root knownoget { /Pages knownoget { dup /Count knownoget { dup type /integertype eq { dup 0 le } { //true } ifelse { @@ -2116,20 +2078,10 @@ currentdict /xref-char-dict undef exch pop //null 0 1 3 index length 1 sub { 2 index exch get - dup oforce - dup //null eq { - PDFSTOPONERROR { - /pdffindpage? cvx /syntaxerror signalerror - } { - ( **** Error: Ignoring a null node in the Page tree.\n) pdfformaterror - pop pop - } ifelse - } { - dup /Kids known { /Count oget } { pop 1 } ifelse + dup oforce dup /Kids known { /Count oget } { pop 1 } ifelse % Stack: index kids null noderef count - dup 5 index ge { pop exch pop exit } if - 5 -1 roll exch sub 4 1 roll pop - } ifelse + dup 5 index ge { pop exch pop exit } if + 5 -1 roll exch sub 4 1 roll pop } for exch pop % Stack: index null|noderef dup //null eq { pop pop 1 //null exit } if @@ -2559,7 +2511,7 @@ end readonly def 2 index sub exch 3 index sub exch 4 2 roll pop pop % stack: savedCTM [Box] XImageable YImageable 2 index aload pop 2 index sub exch 3 index sub exch 4 2 roll pop pop - 5 index /Rotate pget not { 0 } if cvi 90 idiv 1 and 0 ne { exch } if + 5 index /Rotate pget not { 0 } if 90 cvi idiv 1 and 0 ne { exch } if % stack: savedCTM [Box] XImageable YImageable XBox YBox 4 copy 3 -1 roll exch div 3 1 roll div .min @@ -2695,11 +2647,7 @@ currentdict /PDF2PS_matrix_key undef % Determine the number of spot colors used on the page. Note: This searches % the pages resources. It may be high if a spot color is in a resource but % is not actually used on the page. - currentpagedevice /PageSpotColors known { - /PageSpotColors 2 index countspotcolors - userdict /PageSpotColors 2 index put - def - } if + currentpagedevice /PageSpotColors known { /PageSpotColors 2 index countspotcolors def } if % If the user told us to use a named OutputIntent systemdict /UseOutputIntent .knownget { @@ -2753,30 +2701,6 @@ currentdict /PDF2PS_matrix_key undef % Stack: pagedict currentpagedict installproc /Install exch def % Stack: pagedict currentpagedict - % If the Overprint device flag is not /disable, check usage of OP/op - /PageUsesOverprint //false def % assume we don't need OP simulation - dup /Overprint get /disable ne - % If the device suppports SpotColors (DeviceN device) we don't need simulation - 1 index /PageSpotColors known - not and - /HighLevelDevice /GetDeviceParam .special_op { - exch pop - }{ - //false - }ifelse - not and % Only if not HighLevelDevice - { - % Overprint is /enable, so the device might need the overprint compositor - % if it does not support spot colors, thus check if overprint is used so - % overprint simulation can be done with the pdf14 compositor - 1 index countspotcolors userdict exch /PageSpotColors exch put % save it in a known place - 1 index pageusesoverprint - 1 index /ProcessColorModel get /DeviceCMYK eq { - PageSpotColors 0 gt % count of colorants NOT including CMYK - and - } if - /PageUsesOverprint exch def % the page needs OP simulation so set device param. - } if pop currentdict end setpagedevice } bind executeonly def @@ -2845,46 +2769,18 @@ currentdict /PDF2PS_matrix_key undef % and the result was set in the pagedevice dictionary. Use it rather than % scanning again IF it is present. If the pdfshowpage_setup was not called % (eg GSView 5) then it will not be present, so we must rescan. - currentdict /PageUsesTransparency .knownget not {dup pageusestransparency} if + currentpagedevice /PageUsesTransparency .knownget not {dup pageusestransparency} if dup /PDFusingtransparency exch def { - % If the current device isn't CMYK, or if it is a device that supports transparency + % If the current device isn't CMYK, or if it is a device that (currently) supports transparency % we don't need the special handling of Overprint transparency, so disable the checking. - - 4 dict begin % working directory to simplify - currentpagedevice dup /Colors get - /devColors exch def % put into our convenience dict - dup /HaveTransparency .knownget not { //false } if - /devSupportsTrans exch def % put into our convenience dict - dup /Overprint get - /SimOP exch def % put into our convenience dict - SimOP /simulate eq - exch /PageUsesOverprint .knownget not { //false } if - and % both Overprint==/simulate and PageUsesOverprint - { - % Determine if the device needs the special pdf14 compositor push - devColors 4 eq PageSpotColors 0 gt and % CMYK device, but device has spot colors - devColors 4 lt % RGB or Gray device - or - } { - //false % Overprint is not /simulate or PageUseOverprint is false - } ifelse - % Determine if the device needs SMask for Overprint - SimOP /simulate eq { - //true % we will need setupOPrtans for Compatible BM - } { - SimOP /enable eq - devColors 4 ge % CMYK device - and - } ifelse - devSupportsTrans not and % If device supports transparency (e.g. pdfwrite) then no setupOPtrans - end % pop the convenience dict + currentpagedevice dup /Colors get 4 lt 1 index /SimulateOverprint get not or + exch /HaveTransparency .knownget not { //false } if or + % device needs special Oveprint handling /setup_trans exch - { /setupOPtrans } { /setupSMtrans } ifelse + { /setupSMtrans } { /setupOPtrans } ifelse load def - % Show the page within a PDF 1.4 device filter. - { -1 } { 0 } ifelse - .pushpdf14devicefilter { + 0 .pushpdf14devicefilter { /DefaultQstate qstate store % device has changed -- reset DefaultQstate % If the page has a Group, enclose contents in transparency group. % (Adobe Tech Note 5407, sec 9.2) @@ -2912,31 +2808,7 @@ currentdict /PDF2PS_matrix_key undef } { /setup_trans { pop pop } def % no-op this if the page doesn't use transparency % NB: original will be restored from PDFsave - % The page doesn't use transparency, but if Overprint is /simulate, we may need to - % push a pdf14devicefilter to handle the overprint simulation using the pdf14 device. - currentpagedevice - dup /Overprint get /simulate eq - 1 index /PageSpotColors known - not and - exch /PageUsesOverprint .knownget not { //false } if - and - { - % Show the page within a PDF 1.4 device filter for overprint_simulation. - -1 .pushpdf14devicefilter { - /DefaultQstate qstate store % device has changed -- reset DefaultQstate - showpagecontents - } stopped { - % abort the transparency device - .abortpdf14devicefilter - /DefaultQstate qstate store % device has changed -- reset DefaultQstate - stop - } if - { } settransfer % identity transfer during popdevice (put_image) - .poppdf14devicefilter % NB: reset to DefaultQstate will also restore transfer function - /DefaultQstate qstate store % device has changed -- reset DefaultQstate - } { - showpagecontents - } ifelse + showpagecontents } ifelse .free_page_resources % todo: mixing drawing ops outside the device filter could cause @@ -3095,8 +2967,7 @@ currentdict /PDF2PS_matrix_key undef } ifelse } if } if - % default AcroForm to true to match Acrobat. - //systemdict /ShowAcroForm .knownget { //true eq } { //true } ifelse { + //systemdict /ShowAcroForm .knownget { //true eq } { //false } ifelse { Trailer /Root oget /AcroForm knownoget { draw_acro_form } if } if } bind executeonly def @@ -3109,112 +2980,6 @@ currentdict /PDF2PS_matrix_key undef dup { setcolorspace } //.internalstopped exec { pop /DeviceRGB } if } bind executeonly def -% returns true if OP or op is true in an ExtGState -/pageusesoverprint { % pageusesoverprint - dup //false exch { - 4 dict 1 index resourceusesoverprint { pop not exit } if - %% Check the current dictionary and its Parent (if any) to see - %% if they both have stored object numbers. If they do then - %% check the numbers, don't allow self-references. - dup /Parent knownoget not { pop exit } - { - exch /.gs.pdfobj# .knownget - { - 1 index /.gs.pdfobj# .knownget { - eq { - pop exit - }if - }{ - pop - }ifelse - }if - } ifelse - } loop - % Also check for transparency in the annotation (if not in resources). - { pop //true } { annotsuseoverprint } ifelse -} bind def - -% Check if Overprint (OP/op) is specified in an ExtGState dict -/extgstateusesoverprint { % extgstateusesoverprint - //false exch % Assume no overprint - dup //null eq { - pop % bug 692050 - } { - { % establish loop context - dup /OP knownoget { { pop not exit } if } if - dup /op knownoget { { pop not exit } if } if - pop exit - } loop - } ifelse -} bind def - -% Check if overprint is used in a Pattern -/patternusesoverprint { % patternusesoverprint - //false exch % Assume no overprint - { - 4 dict 1 index resourceusesoverprint { pop not exit } if - dup /ExtGState knownoget { extgstateusesoverprint { pop not exit } if } if - pop exit - } loop -} bind def - -% Check the Resources of a page or Form. Check for loops in the resource chain. -/resourceusesoverprint { % resourceusesoverprint - { % Use loop to provide an exitable context. - /Resources knownoget not { 0 dict } if - 2 copy .knownget { - { % Some circular references may be missed because scanning stops - % when the 1st overprint is found. - ( **** File has circular references in resource dictionaries.\n) - pdfformaterror - } if - pop //false exit - } if - 2 copy //true put % In the current chain. - dup /ExtGState knownoget { - //false exch - { exch pop oforce extgstateusesoverprint { pop //true exit } if - } forall - { pop //true exit } if - } if - dup /Pattern knownoget { - //false exch - { exch pop oforce patternusesoverprint { pop //true exit } if - } forall - { pop //true exit } if - } if - 2 copy //false put % Visited but not in the current chain. - pop //false exit - } loop - exch pop -} bind def - -% Check if the annotations on a page use overprint -/annotsuseoverprint { % annotsuseoverprint - //false exch % Assume no overprint - /Annots knownoget { % Get Annots array - dup type /arraytype eq { - { - oforce - dup //null ne { - /AP knownoget { % Get appearance dict for the annoation - /N knownogetdict { % Get the /N (i.e. normal) appearance stream - 4 dict exch resourceusesoverprint { pop pop //true exit } if - } if - } if % If AP dict known - } { - pop - } ifelse - } forall % For all annots on the page - } { - ( **** Error: Annotation array is not an array, ignoring it.\n) pdfformaterror - ( Output may be incorrect.\n) pdfformaterror - pop - } - ifelse - } if -} bind def - % ------ Transparency support ------ % % Determine whether a page might invoke any transparency features: @@ -3397,37 +3162,31 @@ currentdict /PDF2PS_matrix_key undef } { exch pop % remove the 'on error' marker - dup type /dicttype eq { - dup //null ne { - dup /Subtype knownoget { - /Highlight eq { % Highlight annotation is always implemented - pop pop //true exit % as transparency. - } if + dup //null ne { + dup /Subtype knownoget { + /Highlight eq { % Highlight annotation is always implemented + pop pop //true exit % as transparency. } if - dup /AP knownoget { % Get appearance dict for the annoation - /N knownogetdict { % Get the /N (i.e. normal) appearance stream - 4 dict exch resourceusestransparency { pop pop //true exit } if - } if - } if % If AP dict known - dup /BM knownoget { - pop pop pop //true exit + } if + dup /AP knownoget { % Get appearance dict for the annoation + /N knownogetdict { % Get the /N (i.e. normal) appearance stream + 4 dict exch resourceusestransparency { pop pop //true exit } if } if - dup /CA knownoget { - 1 le { - pop pop //true exit - } if + } if % If AP dict known + dup /BM knownoget { + pop pop pop //true exit + } if + dup /CA knownoget { + 1 le { + pop pop //true exit } if - /ca knownoget { - 1 le { - pop //true exit - } if + } if + /ca knownoget { + 1 le { + pop //true exit } if - } { - pop - } ifelse + } if } { - ( **** Error: Annotation entry is not a dictionary, ignoring it.\n) pdfformaterror - ( Output may be incorrect.\n) pdfformaterror pop } ifelse } ifelse @@ -3454,32 +3213,21 @@ currentdict /PDF2PS_matrix_key undef % Thus it may include Cyan, Magenta, Yellow, and Black. % colorspacespotcolors - /colorspacespotcolors { - % Make sure we have an array, and that it is has enough info - exch dup type /arraytype eq - { + exch dup type /arraytype eq { % If we have an Indexed color space then get the base space. dup 0 oget % <<>> [csp] /Type dup /Indexed eq { pop 1 oget % <<>> [base] 2 copy exch colorspacespotcolors } { - dup /Pattern eq { - 1 index length 1 gt { % only uncolored patterns have colorspace - pop 1 oget % <<>> [base] - 2 copy exch colorspacespotcolors + % Stack: + dup /Separation eq exch /DeviceN eq or { + dup 1 oget dup type /arraytype eq { + { oforce 2 index putspotcolor } forall } { - pop + 2 index putspotcolor } ifelse - } { - % Stack: - dup /Separation eq exch /DeviceN eq or { - dup 1 oget dup type /arraytype eq { - { oforce 2 index putspotcolor } forall - } { - 2 index putspotcolor - } ifelse - } if - } ifelse + } if } ifelse } if pop pop @@ -3899,70 +3647,6 @@ currentdict /PDF2PS_matrix_key undef } if } bind executeonly def -% These functions can be used in error handling. It is not always possible to -% use the PostScript sequence 'mark ..... cleartomark' to clean up behind a -% sequence of operations, because processing the PDF might leave a mark -% object on the stack. There are a number of ways to address that problem; one -% is to count the objects on the stack at the time and store that value in a -% convenient dictionary, presented here is an alternative. Instead of using a -% mark object, we can use a specific name object as if it were a mark object -% and use the two routines below to count the number of objects on the stack -% up to a specific key, and to clear the stack back to a named key. - -% -% /key CountToKey false | int true -% -% Counts the operand stack backwards until it encounters -% a specific name key on the stack. Returns true and the count -% of objects on the stack after that key, or false if the key -% was not found on the stack. Consumes the key passed -% to CountToKey. Throws a typecheck if the operand is not -% a name type. -% -/CountToKey -{ - dup type /nametype eq { - //false - 0 1 count 5 sub - { - dup 3 add index - 3 index eq - { - 3 1 roll pop pop //true exit - } - {pop} ifelse - } for - - { - //true - } - { - pop //false - } ifelse - } - { - /CountToKey cvx /typecheck signalerror - }ifelse -}bind readonly def - -% -% /key ClearToKey - -% -% Clears the operand stack backwards until it encounters -% the name object passed as an operand. If the name object -% is not present on the stack then it will clear the entire -% stack. Like cleartomark this removes the 'key' from the stack. -% -/ClearToKey -{ - 0 1 count 4 sub - { - pop - dup 3 1 roll eq {exit} if - } for - pop -}bind readonly def - end % pdfdict diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_ops.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_ops.ps index fe61b12dcdb..47ff512d927 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_ops.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_ops.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -695,11 +695,10 @@ end { % Check OP and BM in case we need to push a group //OPsaveDstack begin //Dpush exec % push the current OPsaveDstack values into 'previous' - /SupportsDevn .special_op okOPcs currentcolorspace 0 get dup /Indexed eq { pop currentcolorspace 1 get % use the base space } if - known or { + known { 1 index /stroke ne { .currentfilloverprint } { .currentstrokeoverprint } ifelse % Change BM to CompatibleOverprint if this has overprint true dup /ChangeBM exch def @@ -1479,8 +1478,19 @@ currentdict /clip_if_required .undef % width under pdfwrite. Pdfwrite uses (in text mode) an identity % CTM, so we need to calculate the stroke width which would result % if the CTM had been unity. - calc_text_linewidth - setlinewidth + currentlinewidth dup + currentdict /qTextSaveMatrix known { + matrix defaultmatrix idtransform qTextSaveMatrix dtransform + }{ + matrix defaultmatrix idtransform TextSaveMatrix dtransform + } ifelse + abs 2 copy exch abs eq { + pop + }{ + % non-square scaling reduces to Text matrix in pdfwrite , so + % we can ignore it. (wrong answer, but consistent) + pop pop currentlinewidth + }ifelse setlinewidth show setlinewidth} bind executeonly % Tr 2 - Fill then Stroke { currentlinewidth exch setsmaskstate @@ -1488,8 +1498,19 @@ currentdict /clip_if_required .undef % width under pdfwrite. Pdfwrite uses (in text mode) an identity % CTM, so we need to calculate the stroke width which would result % if the CTM had been unity. - calc_text_linewidth - setlinewidth + currentlinewidth dup + currentdict /qTextSaveMatrix known { + matrix defaultmatrix idtransform qTextSaveMatrix dtransform + }{ + matrix defaultmatrix idtransform TextSaveMatrix dtransform + } ifelse + abs 2 copy exch abs eq { + pop + }{ + % non-square scaling reduces to Text matrix in pdfwrite , so + % we can ignore it. (wrong answer, but consistent) + pop pop currentlinewidth + }ifelse setlinewidth setsmaskstate show setlinewidth} bind executeonly % Tr 3 - Neither fill nor stroke { setsmaskstate show } bind executeonly @@ -1504,50 +1525,38 @@ currentdict /clip_if_required .undef setsmaskstate dup show grestore //true charpath } bind executeonly % Tr 5 - Stroke, add to clip { gsave 1 .settextrenderingmode - calc_text_linewidth - setlinewidth + currentlinewidth dup + matrix defaultmatrix idtransform TextSaveMatrix dtransform + abs 2 copy exch abs eq { + pop + }{ + % non-square scaling reduces to Text matrix in pdfwrite , so + % we can ignore it. (wrong answer, but consistent) + pop pop currentlinewidth + }ifelse setlinewidth setsmaskstate dup show grestore //true charpath} bind executeonly % Tr 6 - Fill, stroke, add to clip { gsave 2 .settextrenderingmode - calc_text_linewidth - setlinewidth + currentlinewidth dup + currentdict /qTextSaveMatrix known { + matrix defaultmatrix idtransform qTextSaveMatrix dtransform + }{ + matrix defaultmatrix idtransform TextSaveMatrix dtransform + } ifelse + abs 2 copy exch abs eq { + pop + }{ + % non-square scaling reduces to Text matrix in pdfwrite , so + % we can ignore it. (wrong answer, but consistent) + pop pop currentlinewidth + }ifelse setlinewidth setsmaskstate dup show grestore //true charpath} bind executeonly % Tr 7 - Add to clip { //true charpath} bind executeonly ] readonly def -% - calc_text_linewidth calculated_width -% This calculates the required linewidth for stroke for *pdfwrite*, it must not be -% used for rendering. Because pdfwrite writes text scaled into a 72 dpi resolution -% we cannot use the current linewidth for it, it will be too large. Instead we must -% re-calculate the original linewidth (removing the default CTM) and then apply the -% TextSaveMatrix to find the appropriate new linewidth. -% We check to see if the x and y scaling are approximately the same, if they are not -% then we calculate a linewidth based on a right triangle with the x and y values -% of the current linewidth in each direction and then calculate the hypotenuse, which -% we then use as an approximation to the required width. -% The 'approximation' of 0.01 is just a guess. -/calc_text_linewidth -{ - currentlinewidth dup - currentdict /qTextSaveMatrix known { - matrix defaultmatrix idtransform qTextSaveMatrix dtransform - }{ - matrix defaultmatrix idtransform TextSaveMatrix dtransform - } ifelse - abs 2 copy exch abs sub abs 0.01 le { - pop - }{ - % We used to leave the linewidth alone for non-square resolutions, - % claiming it reduced to the text matrix in pdfwrite. This is not - % true. So handle it the same way we usually do, the hypotenuse of - % the unit square transformed through the TextSaveMatrix. - dup mul exch dup mul add sqrt 2 div - }ifelse -} bind executeonly def - /setstrokeforTrpreservation { % Check to see if the current device supports Tr /PreserveTrMode /GetDeviceParam .special_op { @@ -1564,7 +1573,15 @@ currentdict /clip_if_required .undef % CTM, so we need to calculate the stroke width which would result % if the CTM had been unity. NOTE! Only interested in magnitudes, % not signs. - calc_text_linewidth + currentlinewidth dup + matrix defaultmatrix idtransform TextSaveMatrix dtransform + abs 2 copy exch abs eq { + pop + }{ + % non-square scaling reduces to Text matrix in pdfwrite , so + % we can ignore it. (wrong answer, but consistent) + pop pop currentlinewidth + }ifelse setlinewidth } if } if diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_rbld.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_rbld.ps index 6eeb6085e99..037f10b723b 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_rbld.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_rbld.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -142,28 +142,13 @@ PDFfile token pop % get starting entry - or 'trailer' (trailer) ne { % if we do not already have 'trailer' PDFfile token pop % get number of entries - % The following check could be more efficient - % but broken file..... - dup - PDFfile fileposition - PDFfile 0 setfileposition - PDFfile bytesavailable - exch PDFfile exch setfileposition - % On the basis it requires at least 15 bytes to define an object - % in PDF, if the claimed number of objects is more than the number - % of bytes in the file, then it is clearly bogus, and we just give up - 15 idiv - lt { - PDFfile token pop pop % this moves us into the middle of the first entry - 25 string exch % define working string for readline - { PDFfile 1 index readline pop pop - } repeat % skip entries - pop % pop working string - PDFfile token pop pop % get 'trailer' - PDFfile fileposition % get file position - } - { pop 0} - ifelse + PDFfile token pop pop % this moves us into the middle of the first entry + 25 string exch % define working string for readline + { PDFfile 1 index readline pop pop + } repeat % skip entries + pop % pop working string + PDFfile token pop pop % get 'trailer' + PDFfile fileposition % get file position } if } { pop 0 % no xref, should not happen, report it upstrem diff --git a/Master/tlpkg/tlgs/Resource/Init/pdf_sec.ps b/Master/tlpkg/tlgs/Resource/Init/pdf_sec.ps index 9e6c1c0f074..b6f2bfce556 100644 --- a/Master/tlpkg/tlgs/Resource/Init/pdf_sec.ps +++ b/Master/tlpkg/tlgs/Resource/Init/pdf_sec.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -481,33 +481,15 @@ systemdict /check_r6_password .forceundef % Even if StmF and StrF are Identity, if the StdCF is missing AuthEvent % or it is DocOpen, we require the password. Check for that. 1 index /CF .knownget { - oforce dup type /dicttype eq { - /StdCF .knownget { - oforce dup type /dicttype eq { - /AuthEvent .knownget { - oforce dup type /nametype eq { - /DocOpen eq - or - }{ - ( **** Error: AuthEvent has wrong type.\n) pdfformaterror - ( Cannot decrypt PDF file.\n) pdfformaterror - /pdf_process_Encrypt cvx /invalidfileaccess signalerror - } ifelse - } { - pop true % no AuthEvent, default is DocOpen, require password - } ifelse - }{ - ( **** Error: StdCF has wrong type.\n) pdfformaterror - ( Cannot decrypt PDF file.\n) pdfformaterror - /pdf_process_Encrypt cvx /invalidfileaccess signalerror - } ifelse + /StdCF .knownget { + /AuthEvent .knownget { + /DocOpen eq + or } { - pop true % no StdCF, require password + pop true % no AuthEvent, default is DocOpen, require password } ifelse - }{ - ( **** Error: CF has wrong type.\n) pdfformaterror - ( Cannot decrypt PDF file.\n) pdfformaterror - /pdf_process_Encrypt cvx /invalidfileaccess signalerror + } { + pop true % no StdCF, require password } ifelse } { pop true % no CF, require password diff --git a/Master/tlpkg/tlgs/Resource/SubstCID/CNS1-WMode b/Master/tlpkg/tlgs/Resource/SubstCID/CNS1-WMode index 9b3939fab43..cc0e9bbd4b7 100644 --- a/Master/tlpkg/tlgs/Resource/SubstCID/CNS1-WMode +++ b/Master/tlpkg/tlgs/Resource/SubstCID/CNS1-WMode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/SubstCID/GB1-WMode b/Master/tlpkg/tlgs/Resource/SubstCID/GB1-WMode index 7d022f8536f..22da0829dba 100644 --- a/Master/tlpkg/tlgs/Resource/SubstCID/GB1-WMode +++ b/Master/tlpkg/tlgs/Resource/SubstCID/GB1-WMode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/SubstCID/Japan1-WMode b/Master/tlpkg/tlgs/Resource/SubstCID/Japan1-WMode index f2110449b4b..9f85a86e694 100644 --- a/Master/tlpkg/tlgs/Resource/SubstCID/Japan1-WMode +++ b/Master/tlpkg/tlgs/Resource/SubstCID/Japan1-WMode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/Resource/SubstCID/Korea1-WMode b/Master/tlpkg/tlgs/Resource/SubstCID/Korea1-WMode index 8832bbe45b8..ff59b9dc3b1 100644 --- a/Master/tlpkg/tlgs/Resource/SubstCID/Korea1-WMode +++ b/Master/tlpkg/tlgs/Resource/SubstCID/Korea1-WMode @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/bin/gsdll32.dll b/Master/tlpkg/tlgs/bin/gsdll32.dll index 3d8e1b45b51..ccb9e8ae561 100755 Binary files a/Master/tlpkg/tlgs/bin/gsdll32.dll and b/Master/tlpkg/tlgs/bin/gsdll32.dll differ diff --git a/Master/tlpkg/tlgs/bin/gsdll32.lib b/Master/tlpkg/tlgs/bin/gsdll32.lib index 4e83a39ba80..08622653a0e 100644 Binary files a/Master/tlpkg/tlgs/bin/gsdll32.lib and b/Master/tlpkg/tlgs/bin/gsdll32.lib differ diff --git a/Master/tlpkg/tlgs/bin/gswin32.exe b/Master/tlpkg/tlgs/bin/gswin32.exe index 2de05581cfc..30f6cbe7c59 100755 Binary files a/Master/tlpkg/tlgs/bin/gswin32.exe and b/Master/tlpkg/tlgs/bin/gswin32.exe differ diff --git a/Master/tlpkg/tlgs/bin/gswin32c.exe b/Master/tlpkg/tlgs/bin/gswin32c.exe index ab6086ae7f4..d58a476629f 100755 Binary files a/Master/tlpkg/tlgs/bin/gswin32c.exe and b/Master/tlpkg/tlgs/bin/gswin32c.exe differ diff --git a/Master/tlpkg/tlgs/lib/align.ps b/Master/tlpkg/tlgs/lib/align.ps index e1f562b39a1..8f2ebf5a94f 100644 --- a/Master/tlpkg/tlgs/lib/align.ps +++ b/Master/tlpkg/tlgs/lib/align.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/caption.ps b/Master/tlpkg/tlgs/lib/caption.ps index 7e345ba502e..1ec719a74c9 100644 --- a/Master/tlpkg/tlgs/lib/caption.ps +++ b/Master/tlpkg/tlgs/lib/caption.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/cid2code.ps b/Master/tlpkg/tlgs/lib/cid2code.ps index 45044cdf955..98423fb7fd2 100644 --- a/Master/tlpkg/tlgs/lib/cid2code.ps +++ b/Master/tlpkg/tlgs/lib/cid2code.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/docie.ps b/Master/tlpkg/tlgs/lib/docie.ps index 1d1ad9a193c..82a16bb0afe 100644 --- a/Master/tlpkg/tlgs/lib/docie.ps +++ b/Master/tlpkg/tlgs/lib/docie.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_ce_e.ps b/Master/tlpkg/tlgs/lib/gs_ce_e.ps index 150c55b27a3..5db08a11ab5 100644 --- a/Master/tlpkg/tlgs/lib/gs_ce_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_ce_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_css_e.ps b/Master/tlpkg/tlgs/lib/gs_css_e.ps deleted file mode 100644 index c4323bc5b06..00000000000 --- a/Master/tlpkg/tlgs/lib/gs_css_e.ps +++ /dev/null @@ -1,117 +0,0 @@ -% 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., 7 Mt. Lassen Drive - Suite A-134, San Rafael, -% CA 94903, U.S.A., +1(415)492-9861, for further information. -% - -% Define the CFF StandardStrings that represent characters. -% This is a pseudo-encoding. -/currentglobal where - { pop currentglobal { setglobal } //true setglobal } - { { } } -ifelse -/CFFStandardStrings mark - -% 0 - /.notdef /space /exclam /quotedbl /numbersign - /dollar /percent /ampersand /quoteright /parenleft - /parenright /asterisk /plus /comma /hyphen - /period /slash /zero /one /two - /three /four /five /six /seven - /eight /nine /colon /semicolon /less - /equal /greater /question /at /A - /B /C /D /E /F - /G /H /I /J /K - /L /M /N /O /P -% 50 - /Q /R /S /T /U - /V /W /X /Y /Z - /bracketleft /backslash /bracketright /asciicircum /underscore - /quoteleft /a /b /c /d - /e /f /g /h /i - /j /k /l /m /n - /o /p /q /r /s - /t /u /v /w /x - /y /z /braceleft /bar /braceright - /asciitilde /exclamdown /cent /sterling /fraction -% 100 - /yen /florin /section /currency /quotesingle - /quotedblleft /guillemotleft /guilsinglleft /guilsinglright /fi - /fl /endash /dagger /daggerdbl /periodcentered - /paragraph /bullet /quotesinglbase /quotedblbase /quotedblright - /guillemotright /ellipsis /perthousand /questiondown /grave - /acute /circumflex /tilde /macron /breve - /dotaccent /dieresis /ring /cedilla /hungarumlaut - /ogonek /caron /emdash /AE /ordfeminine - /Lslash /Oslash /OE /ordmasculine /ae - /dotlessi /lslash /oslash /oe /germandbls -% 150 - /onesuperior /logicalnot /mu /trademark /Eth - /onehalf /plusminus /Thorn /onequarter /divide - /brokenbar /degree /thorn /threequarters /twosuperior - /registered /minus /eth /multiply /threesuperior - /copyright /Aacute /Acircumflex /Adieresis /Agrave - /Aring /Atilde /Ccedilla /Eacute /Ecircumflex - /Edieresis /Egrave /Iacute /Icircumflex /Idieresis - /Igrave /Ntilde /Oacute /Ocircumflex /Odieresis - /Ograve /Otilde /Scaron /Uacute /Ucircumflex - /Udieresis /Ugrave /Yacute /Ydieresis /Zcaron -% 200 - /aacute /acircumflex /adieresis /agrave /aring - /atilde /ccedilla /eacute /ecircumflex /edieresis - /egrave /iacute /icircumflex /idieresis /igrave - /ntilde /oacute /ocircumflex /odieresis /ograve - /otilde /scaron /uacute /ucircumflex /udieresis - /ugrave /yacute /ydieresis /zcaron /exclamsmall - /Hungarumlautsmall /dollaroldstyle /dollarsuperior /ampersandsmall /Acutesmall - /parenleftsuperior /parenrightsuperior /twodotenleader /onedotenleader /zerooldstyle - /oneoldstyle /twooldstyle /threeoldstyle /fouroldstyle /fiveoldstyle - /sixoldstyle /sevenoldstyle /eightoldstyle /nineoldstyle /commasuperior -% 250 - /threequartersemdash /periodsuperior /questionsmall /asuperior /bsuperior - /centsuperior /dsuperior /esuperior /isuperior /lsuperior - /msuperior /nsuperior /osuperior /rsuperior /ssuperior - /tsuperior /ff /ffi /ffl /parenleftinferior - /parenrightinferior /Circumflexsmall /hyphensuperior /Gravesmall /Asmall - /Bsmall /Csmall /Dsmall /Esmall /Fsmall - /Gsmall /Hsmall /Ismall /Jsmall /Ksmall - /Lsmall /Msmall /Nsmall /Osmall /Psmall - /Qsmall /Rsmall /Ssmall /Tsmall /Usmall - /Vsmall /Wsmall /Xsmall /Ysmall /Zsmall -% 300 - /colonmonetary /onefitted /rupiah /Tildesmall /exclamdownsmall - /centoldstyle /Lslashsmall /Scaronsmall /Zcaronsmall /Dieresissmall - /Brevesmall /Caronsmall /Dotaccentsmall /Macronsmall /figuredash - /hypheninferior /Ogoneksmall /Ringsmall /Cedillasmall /questiondownsmall - /oneeighth /threeeighths /fiveeighths /seveneighths /onethird - /twothirds /zerosuperior /foursuperior /fivesuperior /sixsuperior - /sevensuperior /eightsuperior /ninesuperior /zeroinferior /oneinferior - /twoinferior /threeinferior /fourinferior /fiveinferior /sixinferior - /seveninferior /eightinferior /nineinferior /centinferior /dollarinferior - /periodinferior /commainferior /Agravesmall /Aacutesmall /Acircumflexsmall -% 350 - /Atildesmall /Adieresissmall /Aringsmall /AEsmall /Ccedillasmall - /Egravesmall /Eacutesmall /Ecircumflexsmall /Edieresissmall /Igravesmall - /Iacutesmall /Icircumflexsmall /Idieresissmall /Ethsmall /Ntildesmall - /Ogravesmall /Oacutesmall /Ocircumflexsmall /Otildesmall /Odieresissmall - /OEsmall /Oslashsmall /Ugravesmall /Uacutesmall /Ucircumflexsmall - /Udieresissmall /Yacutesmall /Thornsmall /Ydieresissmall -% 379 - /001.000 /001.001 /001.002 /001.003 - /Black /Bold /Book /Light /Medium - /Regular /Roman /Semibold -%391 = end - -counttomark packedarray exch pop -10 1 index .registerencoding -.defineencoding -exec diff --git a/Master/tlpkg/tlgs/lib/gs_il2_e.ps b/Master/tlpkg/tlgs/lib/gs_il2_e.ps index e9ee3075845..7ef56d4595f 100644 --- a/Master/tlpkg/tlgs/lib/gs_il2_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_il2_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_kanji.ps b/Master/tlpkg/tlgs/lib/gs_kanji.ps index f2de7816242..862f5ff333e 100644 --- a/Master/tlpkg/tlgs/lib/gs_kanji.ps +++ b/Master/tlpkg/tlgs/lib/gs_kanji.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_ksb_e.ps b/Master/tlpkg/tlgs/lib/gs_ksb_e.ps index 2d2960c74bc..4d228765c5f 100644 --- a/Master/tlpkg/tlgs/lib/gs_ksb_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_ksb_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_lgo_e.ps b/Master/tlpkg/tlgs/lib/gs_lgo_e.ps index 1f949ab9b54..dd04ff6673f 100644 --- a/Master/tlpkg/tlgs/lib/gs_lgo_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_lgo_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_lgx_e.ps b/Master/tlpkg/tlgs/lib/gs_lgx_e.ps index a2f6216077f..0c12e2d871c 100644 --- a/Master/tlpkg/tlgs/lib/gs_lgx_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_lgx_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_wl1_e.ps b/Master/tlpkg/tlgs/lib/gs_wl1_e.ps index 10a8f3ca533..72185fee271 100644 --- a/Master/tlpkg/tlgs/lib/gs_wl1_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_wl1_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_wl2_e.ps b/Master/tlpkg/tlgs/lib/gs_wl2_e.ps index f7fc8cc1e9a..6b55c55743c 100644 --- a/Master/tlpkg/tlgs/lib/gs_wl2_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_wl2_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gs_wl5_e.ps b/Master/tlpkg/tlgs/lib/gs_wl5_e.ps index f7549b49d8b..4f259792f70 100644 --- a/Master/tlpkg/tlgs/lib/gs_wl5_e.ps +++ b/Master/tlpkg/tlgs/lib/gs_wl5_e.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gslp.ps b/Master/tlpkg/tlgs/lib/gslp.ps index 173d52c2170..9e2c21bf304 100644 --- a/Master/tlpkg/tlgs/lib/gslp.ps +++ b/Master/tlpkg/tlgs/lib/gslp.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/gsnup.ps b/Master/tlpkg/tlgs/lib/gsnup.ps index 61fd57a6633..ea01d874bb8 100644 --- a/Master/tlpkg/tlgs/lib/gsnup.ps +++ b/Master/tlpkg/tlgs/lib/gsnup.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/image-qa.ps b/Master/tlpkg/tlgs/lib/image-qa.ps index 4780c14e583..307a951d31b 100644 --- a/Master/tlpkg/tlgs/lib/image-qa.ps +++ b/Master/tlpkg/tlgs/lib/image-qa.ps @@ -1,5 +1,5 @@ %!PS -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/jispaper.ps b/Master/tlpkg/tlgs/lib/jispaper.ps index 6b59f70b0b5..d1e33e6acb7 100644 --- a/Master/tlpkg/tlgs/lib/jispaper.ps +++ b/Master/tlpkg/tlgs/lib/jispaper.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/lines.ps b/Master/tlpkg/tlgs/lib/lines.ps index a721009aaf6..287b6bdbea2 100644 --- a/Master/tlpkg/tlgs/lib/lines.ps +++ b/Master/tlpkg/tlgs/lib/lines.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/mkcidfm.ps b/Master/tlpkg/tlgs/lib/mkcidfm.ps index 6e017161dc3..7dd92fe39e3 100644 --- a/Master/tlpkg/tlgs/lib/mkcidfm.ps +++ b/Master/tlpkg/tlgs/lib/mkcidfm.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/pdf2dsc.ps b/Master/tlpkg/tlgs/lib/pdf2dsc.ps index 8e65d9e0279..88bc1536242 100644 --- a/Master/tlpkg/tlgs/lib/pdf2dsc.ps +++ b/Master/tlpkg/tlgs/lib/pdf2dsc.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/pdf_info.ps b/Master/tlpkg/tlgs/lib/pdf_info.ps index 35951e9a736..0b4654ab073 100644 --- a/Master/tlpkg/tlgs/lib/pdf_info.ps +++ b/Master/tlpkg/tlgs/lib/pdf_info.ps @@ -1,5 +1,5 @@ %!PS -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or @@ -69,81 +69,6 @@ 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 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 @@ -167,6 +92,19 @@ cleartomark % discard the dict from --where-- } ifelse } bind def +/printXML { % printXML - + % print non-blank lines without trailing spaces + dup dup length 1 sub -1 0 { + 1 index 1 index get 32 eq { + 0 exch getinterval exch + } { + exch = exit % non-blank on this line + } + ifelse + } for + pop pop % clean up +} bind def + /dump-pdf-info { % (fname) -> - () = ( ) print print ( has ) print PDFPageCount dup =print 10 mod 1 eq { ( page.\n) } { ( pages\n) } ifelse = flush @@ -182,24 +120,24 @@ cleartomark % discard the dict from --where-- pop Trailer /Root oget /Metadata knownoget { //false resolvestream - { dup 256 string readstring exch print not { exit } if } loop + { dup 256 string readline exch printXML 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 + dup /Title knownoget { (Title: ) print = flush } if + dup /Author knownoget { (Author: ) print = flush } if + dup /Subject knownoget { (Subject: ) print = flush } if + dup /Keywords knownoget { (Keywords: ) print = flush } if + dup /Creator knownoget { (Creator: ) print = flush } if + dup /Producer knownoget { (Producer: ) print = flush } if + dup /CreationDate knownoget { (CreationDate: ) print = flush } if + dup /ModDate knownoget { (ModDate: ) print = flush } if + dup /Trapped knownoget { (Trapped: ) print = flush } if pop } if @@ -236,27 +174,9 @@ cleartomark % discard the dict from --where-- pop ( Page contains Annotations) print } if - dup pageusestransparency { + 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 } { @@ -273,7 +193,6 @@ cleartomark % discard the dict from --where-- ] def /res-type-dict 10 dict begin - /Font { { exch pop oforce_no_circular @@ -399,28 +318,6 @@ currentdict /res-type-dict undef currentdict /ProcessedResources undef } bind def -% If running with -dSAFER, .sort may not be present. Define a (slower) PS alternative -systemdict /.sort known not { -% .sort - /.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 { % dump-fonts-used - % If DumpFontsUsed is not true, then remove the 'standard' fonts from the list systemdict /DumpFontsUsed known not { diff --git a/Master/tlpkg/tlgs/lib/pfbtopfa.ps b/Master/tlpkg/tlgs/lib/pfbtopfa.ps index e31db5b0603..2b69c58f63a 100644 --- a/Master/tlpkg/tlgs/lib/pfbtopfa.ps +++ b/Master/tlpkg/tlgs/lib/pfbtopfa.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/ppath.ps b/Master/tlpkg/tlgs/lib/ppath.ps index daf7f3990e2..5c571019d05 100644 --- a/Master/tlpkg/tlgs/lib/ppath.ps +++ b/Master/tlpkg/tlgs/lib/ppath.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/pphs.ps b/Master/tlpkg/tlgs/lib/pphs.ps index 78dfd060e23..8605f2dd367 100644 --- a/Master/tlpkg/tlgs/lib/pphs.ps +++ b/Master/tlpkg/tlgs/lib/pphs.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/prfont.ps b/Master/tlpkg/tlgs/lib/prfont.ps index 59b9c199610..059d2a08483 100644 --- a/Master/tlpkg/tlgs/lib/prfont.ps +++ b/Master/tlpkg/tlgs/lib/prfont.ps @@ -1,7 +1,7 @@ %! %%Creator: Eric Gisin %%Title: Print font catalog -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/ps2ai.ps b/Master/tlpkg/tlgs/lib/ps2ai.ps index fd0dac4a863..20ae204eb04 100644 --- a/Master/tlpkg/tlgs/lib/ps2ai.ps +++ b/Master/tlpkg/tlgs/lib/ps2ai.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/ps2epsi.ps b/Master/tlpkg/tlgs/lib/ps2epsi.ps index 07d19ded1ee..54621f92834 100644 --- a/Master/tlpkg/tlgs/lib/ps2epsi.ps +++ b/Master/tlpkg/tlgs/lib/ps2epsi.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/rollconv.ps b/Master/tlpkg/tlgs/lib/rollconv.ps index edeb11074e8..3a39e02122a 100644 --- a/Master/tlpkg/tlgs/lib/rollconv.ps +++ b/Master/tlpkg/tlgs/lib/rollconv.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/stocht.ps b/Master/tlpkg/tlgs/lib/stocht.ps index bf0c5905a11..8c9bb438303 100644 --- a/Master/tlpkg/tlgs/lib/stocht.ps +++ b/Master/tlpkg/tlgs/lib/stocht.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/traceimg.ps b/Master/tlpkg/tlgs/lib/traceimg.ps index eb5cba8cfb2..4ab8720f4b7 100644 --- a/Master/tlpkg/tlgs/lib/traceimg.ps +++ b/Master/tlpkg/tlgs/lib/traceimg.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/traceop.ps b/Master/tlpkg/tlgs/lib/traceop.ps index 7fa5bcb4df4..ecd8ce271df 100644 --- a/Master/tlpkg/tlgs/lib/traceop.ps +++ b/Master/tlpkg/tlgs/lib/traceop.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/uninfo.ps b/Master/tlpkg/tlgs/lib/uninfo.ps index a2cff7ed7ef..98e89062fd6 100644 --- a/Master/tlpkg/tlgs/lib/uninfo.ps +++ b/Master/tlpkg/tlgs/lib/uninfo.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewcmyk.ps b/Master/tlpkg/tlgs/lib/viewcmyk.ps index e8034e53346..e4250bf1d21 100644 --- a/Master/tlpkg/tlgs/lib/viewcmyk.ps +++ b/Master/tlpkg/tlgs/lib/viewcmyk.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewgif.ps b/Master/tlpkg/tlgs/lib/viewgif.ps index a261bf7e654..55a39862b2c 100644 --- a/Master/tlpkg/tlgs/lib/viewgif.ps +++ b/Master/tlpkg/tlgs/lib/viewgif.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewmiff.ps b/Master/tlpkg/tlgs/lib/viewmiff.ps index 90db80b0922..39d715d04c2 100644 --- a/Master/tlpkg/tlgs/lib/viewmiff.ps +++ b/Master/tlpkg/tlgs/lib/viewmiff.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewpbm.ps b/Master/tlpkg/tlgs/lib/viewpbm.ps index c8d3f86bc84..ec355313767 100644 --- a/Master/tlpkg/tlgs/lib/viewpbm.ps +++ b/Master/tlpkg/tlgs/lib/viewpbm.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewpcx.ps b/Master/tlpkg/tlgs/lib/viewpcx.ps index 76bfdfae6eb..6840f1e5c0f 100644 --- a/Master/tlpkg/tlgs/lib/viewpcx.ps +++ b/Master/tlpkg/tlgs/lib/viewpcx.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewps2a.ps b/Master/tlpkg/tlgs/lib/viewps2a.ps index dafb6d5c3b0..e0fb32bdab6 100644 --- a/Master/tlpkg/tlgs/lib/viewps2a.ps +++ b/Master/tlpkg/tlgs/lib/viewps2a.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewpwg.ps b/Master/tlpkg/tlgs/lib/viewpwg.ps index 4ee0cdb7aed..9abae63a436 100644 --- a/Master/tlpkg/tlgs/lib/viewpwg.ps +++ b/Master/tlpkg/tlgs/lib/viewpwg.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2017-2021 Artifex Software, Inc. +% Copyright (C) 2017-2018 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewraw.ps b/Master/tlpkg/tlgs/lib/viewraw.ps index dee86e02300..f1a3f890147 100644 --- a/Master/tlpkg/tlgs/lib/viewraw.ps +++ b/Master/tlpkg/tlgs/lib/viewraw.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/viewrgb.ps b/Master/tlpkg/tlgs/lib/viewrgb.ps index ab2f6d82c4a..adde24e4c5d 100644 --- a/Master/tlpkg/tlgs/lib/viewrgb.ps +++ b/Master/tlpkg/tlgs/lib/viewrgb.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/winmaps.ps b/Master/tlpkg/tlgs/lib/winmaps.ps index 9a4499ac3ee..75933fc2e9d 100644 --- a/Master/tlpkg/tlgs/lib/winmaps.ps +++ b/Master/tlpkg/tlgs/lib/winmaps.ps @@ -1,4 +1,4 @@ -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/zeroline.ps b/Master/tlpkg/tlgs/lib/zeroline.ps index 37f9fda416a..7ace3ca323b 100644 --- a/Master/tlpkg/tlgs/lib/zeroline.ps +++ b/Master/tlpkg/tlgs/lib/zeroline.ps @@ -1,5 +1,5 @@ %! -% Copyright (C) 2001-2021 Artifex Software, Inc. +% Copyright (C) 2001-2020 Artifex Software, Inc. % All Rights Reserved. % % This software is provided AS-IS with no warranty, either express or diff --git a/Master/tlpkg/tlgs/lib/zugferd.ps b/Master/tlpkg/tlgs/lib/zugferd.ps deleted file mode 100644 index 0320fb69e8e..00000000000 --- a/Master/tlpkg/tlgs/lib/zugferd.ps +++ /dev/null @@ -1,316 +0,0 @@ -% 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. -% -% zugferd.ps -% This program will create an (unsigned) ZUGFeRD compliant PDF file. In -% order to do so the user must provide certain information, or edit this program. -% -% Required information is the path to the XML file containing the invoice data, -% and the path to an ICC profile appropriate for the chosen ColorConversionStrategy. -% -sZUGFeRDXMLFile defines a path to the XML invoice file and -sZUGFeRDProfile -% defines the path to the ICC profile. -% -% The user must additionally set -dPDFA=3 and -sColorConversionStrategy on the -% Ghostscript command line, and set the permissions for Ghostscript to read -% both these files. It is simplest to put the files in a directory and then -% permit reading of the entire directory. -% -% Example command line : -% -% gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3 -sColorConversionStrategy=RGB \ -% -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml -sZUGFeRDProfile=/usr/home/me/rgb.icc \ -% -o /usr/home/me/zugferd/zugferd.pdf /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf -% -% Much of this program results from a Ghostscript bug report, the thread can be found at -% https://bugs.ghostscript.com/show_bug.cgi?id=696472 Portions of the code below were -% supplied by Reinhard Nissl and I'm indebted to him for his efforts in helping me create -% a solution for this problem as well as for the code he supplied, particularly for the -% SimpleUTF16BE routine. -% -% It should not be necessary to modify this program, the comments in the code are there purely for information, -% but there are two areas which might reasonably be altered. The section with the --8<-- lines could be replaced -% with a simpler /N 3 or /N 4 if you always intend to produce the same kind of files; RGB or CMYK. -% In step 7, the large XML string will need to be replaced if you want to produce a ZUGFeRD 2.1 -% file, and in future may require similar modification for later versions. -% - -% istring SimpleUTF16BE ostring -/SimpleUTF16BE -{ - dup length - 1 add - 2 mul - string - - % istring ostring - dup 0 16#FE put - dup 1 16#FF put - 2 - 3 -1 roll - - % ostring index istring - { - % ostring index ichar - 3 1 roll - % ichar ostring index - 2 copy 16#00 put - 1 add - 2 copy - 5 -1 roll - % ostring index ostring index ichar - put - 1 add - % ostring index - } - forall - - % ostring index - pop -} -bind def - -% First check that the user has defined the XML invoice file on the command line -% -/ZUGFeRDXMLFile where { - pop % Discard the dictionary - % - % Now check that the ICC Profile is defined - % - /ZUGFeRDProfile where { - pop % Discard the dictionary - - % Step 1, add the required PDF/A boilerplate. This is mostly copied from lib/pdfa_de.ps - % Create a PDF stream object to hold the ICC profile. - [ /_objdef {icc_PDFA} /type /stream /OBJ pdfmark - - % Add the required entries to the stream dictionary (/N only) - [ {icc_PDFA} - << - %% This code attempts to set the /N (number of components) key for the ICC colour space. - %% To do this it checks the ColorConversionStrategy or the device ProcessColorModel if - %% ColorConversionStrategy is not set. - %% This is not 100% reliable. A better solution is for the user to edit this and replace - %% the code between the ---8<--- lines with a simple declaration like: - %% /N 3 - %% where the value of N is the number of components from the profile defined in ZUGFeRDProfile. - %% - %% ----------8<--------------8<-------------8<--------------8<---------- - systemdict /ColorConversionStrategy known { - systemdict /ColorConversionStrategy get cvn dup /Gray eq { - pop /N 1 false - }{ - dup /RGB eq { - pop /N 3 false - }{ - /CMYK eq { - /N 4 false - }{ - (ColorConversionStrategy not a device space, falling back to ProcessColorModel, output may not be valid PDF/A.)= - true - } ifelse - } ifelse - } ifelse - } { - (ColorConversionStrategy not set, falling back to ProcessColorModel, output may not be valid PDF/A.)= - true - } ifelse - - { - currentpagedevice /ProcessColorModel get - dup /DeviceGray eq { - pop /N 1 - }{ - dup /DeviceRGB eq { - pop /N 3 - }{ - dup /DeviceCMYK eq { - pop /N 4 - } { - (ProcessColorModel not a device space.)= - /ProcessColorModel cvx /rangecheck signalerror - } ifelse - } ifelse - } ifelse - } if - %% ----------8<--------------8<-------------8<--------------8<---------- - >> /PUT pdfmark - - % Now read the ICC profile from the file into the stream - [ {icc_PDFA} ZUGFeRDProfile (r) file /PUT pdfmark - - % Define the output intent dictionary : - [/_objdef {OutputIntent_PDFA} /type /dict /OBJ pdfmark - - % Add the required keys to the dictionary - [{OutputIntent_PDFA} << - /Type /OutputIntent - /S /GTS_PDFA1 % Required for PDF/A. - /DestOutputProfile {icc_PDFA} % The actual profile. - /OutputConditionIdentifier (Custom) % A better solution is a string from the ICC Registry, but Custom is always valid. - >> /PUT pdfmark - - % And now add the OutputIntent to the Catalog dictionary - [ {Catalog} << /OutputIntents [ {OutputIntent_PDFA} ]>> /PUT pdfmark - - - % Step 2, define the XML file and read it into the PDF - % First we define the PDF stream to contain the XML invoice - [ /_objdef {InvoiceStream} /type /stream /OBJ pdfmark - - % Fill in the dictionary elements we need. We believe the - % ModDate is not useful so it's just set to a valid value. - [ {InvoiceStream} << - /Type /EmbeddedFile - /Subtype (text/xml) cvn - /Params << - /ModDate (D:20130121081433+01’00’) - >> - >> /PUT pdfmark - - % Now read the data from the file and store it in the stream - [ {InvoiceStream} ZUGFeRDXMLFile (r) file /PUT pdfmark - - % and close the stream - [ {InvoiceStream} /CLOSE pdfmark - - - % Step 3 create the File Specification dictionary for the embedded file - % Create the dictionary - [ /_objdef {FSDict} /type /dict /OBJ pdfmark - - % Fill in the required dictionary elements - [ {FSDict} << - /Type /FileSpec - /F ZUGFeRDXMLFile - /UF ZUGFeRDXMLFile SimpleUTF16BE - /Desc (ZUGFeRD electronic invoice) - /AFRelationship /Alternative - /EF << - /F {InvoiceStream} - /UF {InvoiceStream} - >> - >> - /PUT pdfmark - - - % Step 4 Create the Associated Files dictionary to hold the FS dict - % Create the dictionary - [ /_objdef {AFArray} /type /array /OBJ pdfmark - - % Put (append) the FS dictionary into the Associated Files array - [ {AFArray} {FSDict} /APPEND pdfmark - - - % Step 5 Add an entry in the Catalog dictionary containing the AF array - [ {Catalog} << /AF {AFArray} >> /PUT pdfmark - - - % Step 6 use the EMBED pdfmark to add the XML file and FS dictionary to the PDF name tree - [ /Name ZUGFeRDXMLFile /FS {FSDict} /EMBED pdfmark - - - % Step 7 Add the extra ZUGFeRD XML data to the Metadata - [ /XML -( - - - - - - - - - ZUGFeRD PDFA Extension Schema - - urn:ferd:pdfa:invoice:rc# - - zf - - - - ! - - - DocumentFileName - Text - external - name of the embedded xml invoice file - - - - DocumentType - Text - external - INVOICE - - - - Version - Text - external - The actual version of the ZUGFeRD data - - - - ConformanceLevel - Text - external - The conformance level of the ZUGFeRD data - - - - - - - - - - INVOICE - ZUGFeRD-invoice.xml - RC - BASIC - -) /Ext_Metadata pdfmark - } - { - % No ICC Profile definition on the command line; chide the user and give them an example - % - (\nERROR - ZUGFeRDProfile has not been supplied, you must supply an ICC profile\n) print - ( Producing a potentially invalid PDF/A file!!\n) print - (example usage - gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3\\\n) print - ( -sColorConversionStrategy=RGB -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml\\\n) print - ( -sZUGFeRDProfile=/usr/home/me/rgb.icc -o /usr/home/me/zugferd/zugferd.pdf\\\n) print - ( /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf\n\n) print flush - } ifelse -} -{ - % No XML invoice definition on the command line; chide the user and give them an example - % - (\nERROR - ZUGFeRDXMLFile has not been supplied, you must supply an XML invoice file\n) print - ( Producing a PDF/A file not a ZUGFeRD file.\n) print - (example usage - gs --permit-file-read=/usr/home/me/zugferd/ -sDEVICE=pdfwrite -dPDFA=3\\\n) print - ( -sColorConversionStrategy=RGB -sZUGFeRDXMLFile=/usr/home/me/zugferd/invoice.xml\\\n) print - ( -sZUGFeRDProfile=/usr/home/me/rgb.icc -o /usr/home/me/zugferd/zugferd.pdf\\\n) print - ( /usr/home/me/zugferd/zugferd.ps /usr/home/me/zugferd/original.pdf\n\n) print flush -} ifelse - -% That's all the ZUGFeRD and PDF/A-3 setup completed, all that remains now is to run the input file -- cgit v1.2.3