diff options
author | Karl Berry <karl@freefriends.org> | 2022-05-11 19:52:19 +0000 |
---|---|---|
committer | Karl Berry <karl@freefriends.org> | 2022-05-11 19:52:19 +0000 |
commit | e86d22fd7e27d2b130b3265fd12994e6f5c92d25 (patch) | |
tree | 24a71fe2d0e2a88cba355a73b6e189783ebeaf13 /Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty | |
parent | e61a87f98a798358891c94904b47cfef50386581 (diff) |
pdfmanagement-testphase (11may22)
git-svn-id: svn://tug.org/texlive/trunk@63281 c570f23f-e606-0410-a88d-b1316a301751
Diffstat (limited to 'Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty')
-rw-r--r-- | Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty new file mode 100644 index 00000000000..7bef6181630 --- /dev/null +++ b/Master/texmf-dist/tex/latex/pdfmanagement-testphase/colorspace-patches-tmp-ltx.sty @@ -0,0 +1,85 @@ +%% This is file `hyperxmp-patches-tmp-ltx.sty" +% Copyright (C) 2019-2021 The LaTeX Project +% +% It may be distributed and/or modified under the conditions of the +% LaTeX Project Public License (LPPL), either version 1.3c of this +% license or (at your option) any later version. The latest version +% of this license is in the file +% +% https://www.latex-project.org/lppl.txt +% +% This file is part of the "pdfmanagement bundle" (The Work in LPPL) +% and all files in that bundle must be distributed together. +% +% ----------------------------------------------------------------------- +% +% The development version of the bundle can be found at +% +% https://github.com/latex3/pdfresources +% +% for those people who are interested. +\NeedsTeXFormat{LaTeX2e}[2020/10/01] +\ProvidesExplPackage{colorspace-patches-tmp-ltx}{2022-05-11}{0.95o} + {temporay patches to for the colorspace package to test pdfresource management ... UF} + +\hook_gput_code:nnn {begindocument} {pdf} + { + \tl_if_exist:NT \spc@op + { + \def\spc@Pageresources#1{} + } + + } + +\hook_gput_code:nnn {begindocument/end} {pdf} + { + \tl_if_exist:NT \spc@op + { + \__pdf_backend_object_new:nn {__spc_extgstate_op_false}{dict} + \__pdf_backend_object_write:nn + {__spc_extgstate_op_false} + {/Type /ExtGState~/op~false~/OP~false} + \pdfmanagement_add:nnn + {Page/Resources/ExtGState} + {SPCko} + {\__pdf_backend_object_ref:n {__spc_extgstate_op_false}} + \__pdf_backend_object_new:nn {__spc_extgstate_op_true0}{dict} + \__pdf_backend_object_write:nn + {__spc_extgstate_op_true0} + {/Type /ExtGState~/op~true~/OP~true~/OPM~0}% + \pdfmanagement_add:nnn + {Page/Resources/ExtGState} + {SPCmz} + {\__pdf_backend_object_ref:n {__spc_extgstate_op_true0}} + \__pdf_backend_object_new:nn {__spc_extgstate_op_true1}{dict} + \__pdf_backend_object_write:nn + {__spc_extgstate_op_true1} + {/Type /ExtGState~/op~true~/OP~true~/OPM~1}% + \pdfmanagement_add:nnn + {Page/Resources/ExtGState} + {SPCop} + {\__pdf_backend_object_ref:n {__spc_extgstate_op_true1}} + } + } + +\RemoveFromHook{begindocument}[colorspace] + +\hook_gput_code:nnn {enddocument} {pdf} + { + \def\spc@elt#1#2 + { + \str_set_eq:Nc\l_tmpa_str {spc@ir@#2} + \seq_set_split:NnV \l_tmpa_seq {~}\l_tmpa_str + \seq_get_left:NN\l_tmpa_seq\l_tmpa_str + %remove spaces + \exp_args:NNx + \str_replace_all:Nnn\l_tmpa_str {\c_hash_str20}{~} + %remove slash + \str_set:Nx\l_tmpa_str{\str_tail:N\l_tmpa_str} + \pdfmanagement_add:nex + {Page/Resources/ColorSpace}{\l_tmpa_str}{\seq_item:Nn\l_tmpa_seq{2}~0~R} + } + \spc@csall + } + +\endinput |