texlive[60016] Master/texmf-dist: pdfmanagement-testphase (22jul21)

commits+karl at tug.org commits+karl at tug.org
Thu Jul 22 22:40:06 CEST 2021


Revision: 60016
          http://tug.org/svn/texlive?view=revision&revision=60016
Author:   karl
Date:     2021-07-22 22:40:06 +0200 (Thu, 22 Jul 2021)
Log Message:
-----------
pdfmanagement-testphase (22jul21)

Modified Paths:
--------------
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
    trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
    trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty
    trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/CHANGELOG.md	2021-07-22 20:40:06 UTC (rev 60016)
@@ -4,6 +4,22 @@
 
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 this project uses date-based 'snapshot' version identifiers.
+## [2021-07-21]
+### Added
+ - key `testphase` to \DeclareDocumentMetadata to load testphase packages like
+   tagpdf, ptagging and headings
+ - key `activate` to \DeclareDocumentMetadata to activate e.g. tagging. 
+ - key `debug` with para=show, log=XX or uncompress as values.
+ - l3pdfxform: support for dvips
+  
+### Changed 
+ - a LaTeX format/L3 layer that loads l3color is now required
+    
+### Fixed
+ - argument order in \hrefrun was wrong. filename should be the first argument.
+ - xcolor firstaid: svgnames could no longer be loaded due to changes in l3color.
+   
+
 ## [2021-06-29]
 
 ### Fixed

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md
===================================================================
--- trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/README.md	2021-07-22 20:40:06 UTC (rev 60016)
@@ -1,6 +1,6 @@
 # LaTeX PDF management testphase bundle
 
-Version: 0.95f, 2021-06-29
+Version: 0.95g, 2021-07-21
 
 This package is used during a test phase to load the new PDF management code
 of LaTeX.

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/hyperref-generic.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3backend-testphase.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfannot.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfdict.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-action.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-checkbox.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-choice.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-pushbutton.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-radiobutton.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield-textfield.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffield.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdffile.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmanagement.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfmeta.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdftools.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/l3pdfxform.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/ltdocinit.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-firstaid.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/doc/latex/pdfmanagement-testphase/pdfmanagement-testphase.pdf
===================================================================
(Binary files differ)

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/hyperref-generic.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -86,7 +86,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -133,14 +133,13 @@
 %  it is recommended for most options ---with the exception of a few mentioned below in
 %  section~\ref{sec:pkg-options}---to set them in \cs{hypersetup},
 %  not as package option.
-%  \item This driver uses \pkg{l3color} for the colors. All colors
+%  \item This driver uses the \pkg{l3color} module for the colors. All colors
 %  defined with \cs{color_set:nn} or \cs{color_set:nnn} will work.
 %  Colors defined with \pkg{xcolor} will work if they don't use one of
 %  the special color models not supported by \pkg{l3color} as
 %  \pkg{pdfmanagement-firstaid} contains a patch for xcolor.
 %  If the package \pkg{color} is used it is currently recommended to define
-%  colors after \pkg{hyperref}. This driver uses \pkg{l3color} for the colors,
-%  some special color models of \pkg{xcolor} won't work.
+%  colors after \pkg{hyperref}.
 %  \item Load a color package or graphicx to get the right page sizes.
 %  \item Report problems! Only known problem can be resolved.
 %  \end{itemize}
@@ -859,11 +858,11 @@
 %^^A %% drivers are loaded in line 4745 in hyperref.sty in a \Hy at AtEndOfPackage command.
 %^^A %%%%%%%%%%%%%%%%%%%%%%%%%%%%
 %^^A %% list of new internal commands
-%^^A %% __hyp_link_goto_begin:nw : start command for links to internal destination
+%^^A %% @@_link_goto_begin:nw : start command for links to internal destination
 %^^A %%                             replaces \find at pdflink
-%^^A %% __hyp_link_goto_end:
-%^^A %% __hyp_destination:n     :  sets an anchor, replaces \new at pdflink
-%^^A %% \__hyp_PageLabels_gpush: : puts pagelabels in the catalog, used on every storing
+%^^A %% @@_link_goto_end:
+%^^A %% @@_destination:n     :  sets an anchor, replaces \new at pdflink
+%^^A %% \@@_PageLabels_gpush: : puts pagelabels in the catalog, used on every storing
 %^^A %% PDF String (text)
 %^^A %% *\@@_text_pdfstring:nnN  : replaces Hy at pstringdef, converts #1 to pdfstring in encoding #2
 %^^A %%                           and stores in N
@@ -882,10 +881,10 @@
 %^^A %% % helps to display key list messages
 %^^A %% \@@_clist_display:n
 %^^A %%
-%^^A %% \__hyp_info_generate_addons: what did this do??
+%^^A %% \@@_info_generate_addons: what did this do??
 %^^A %%
-%^^A %% \g__hyp_AcroForm_CoFields_prop
-%^^A %% \g__hyp_AcroForm_Fields_prop
+%^^A %% \g_@@_AcroForm_CoFields_prop
+%^^A %% \g_@@_AcroForm_Fields_prop
 %^^A %%
 %^^A %%  \g_@@_dest_pdfstartpage_tl ,
 %^^A %%  \g_@@_dest_pdfstartview_tl ,
@@ -922,7 +921,7 @@
 %<@@=hyp>
 %    \end{macrocode}
 %    \begin{macrocode}
-\ProvidesFile{hgeneric-testphase.def}[2021-06-29 v0.95f %
+\ProvidesFile{hgeneric-testphase.def}[2021-07-21 v0.95g %
   generic Hyperref driver for the LaTeX PDF management testphase bundle]
 
 \RequirePackage{etoolbox} %why?
@@ -1244,10 +1243,10 @@
   \let\protect\@unexpandable at protect
   \bool_if:NTF \l_@@_href_url_encode_bool
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI}
     }
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string}
     }
   \@ifnextchar\bgroup\Hy at href{\hyper at normalise\href@}%
 }
@@ -1274,10 +1273,10 @@
    \let\protect\@unexpandable at protect
    \bool_if:NTF \l_@@_href_url_encode_bool
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI}
     }
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string}
     }
   \hyper at normalise\@@_href_url_aux:nn}
 
@@ -1319,7 +1318,7 @@
 
 \cs_new_protected:Npn \@@_href_run_aux:nn #1 #2
   {
-    \exp_args:Nnno\hyper at linklaunch{#2}{#1}{\l_@@_href_run_parameter_tl}
+    \exp_args:Nnno\hyper at linklaunch{#1}{#2}{\l_@@_href_run_parameter_tl}
     \group_end:
     \hook_use:n{cmd/hrefrun/after}
   }
@@ -1336,10 +1335,10 @@
    \let\protect \@unexpandable at protect
     \bool_if:NTF \l_@@_href_url_encode_bool
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/URI}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/URI}
     }
     {
-      \tl_set:Nn \l__hyp_text_enc_uri_print_tl {utf8/string}
+      \tl_set:Nn \l_@@_text_enc_uri_print_tl {utf8/string}
     }
    \hyper at normalise\@@_href_url_aux:n
   }
@@ -1959,17 +1958,27 @@
 % xetex version. It is not quite clear if really all three
 % are needed for the backends supported by this driver, but changing the hyperref
 % code would be difficult.
+% We add a hook. This allows e.g. the tagging code
+% to create also a structured destination.
+% We don't use the cmd hook, as we want the same hook for both start commands.
+% We make the current dest name available so that the hook code can use it.
 %  \begin{macro}
 %    {
 %      \hyper at anchor,
 %      \hyper at anchorstart,
-%      \hyper at anchorend
+%      \hyper at anchorend,
+%      hyp/anchor,
+%      \l_hyp_current_dest_name_tl
 %    }
 %    \begin{macrocode}
+\tl_new:N\l_hyp_current_dest_name_tl
+\hook_new:n{hyp/anchor}
 \cs_new_protected:Npn \hyper at anchor #1
   {
     \exp_args:NnV
       \@@_destination:nn {#1} \l_@@_dest_pdfview_tl
+    \tl_set:Nn \l_hyp_current_dest_name_tl {#1}
+    \hook_use:n{hyp/anchor}
   }
 
 \cs_new_protected:Npn \hyper at anchorstart #1
@@ -1977,6 +1986,8 @@
     \Hy at activeanchortrue
     \exp_args:NnV
       \@@_destination:nn {#1} \l_@@_dest_pdfview_tl
+    \tl_set:Nn \l_hyp_current_dest_name_tl {#1}
+    \hook_use:n{hyp/anchor}
   }
 
 \cs_new_protected:Npn \hyper at anchorend
@@ -2059,7 +2070,9 @@
 % \end{function}
 
 % \pkg{hyperref} adds a group with \cs{Hy at colorlink}, we move this outside the link
-% so that it groups the context hook too.
+% so that it groups the context hook too. We store again the destination name in the
+% public tl |\l_hyp_current_dest_name_tl| so that the hook code can make use of
+% it
 %    \begin{macrocode}
 
 \cs_new_protected:Npn \hyper at link #1 #2 #3 %#1 context, #2=destination name, #3 content
@@ -2068,9 +2081,10 @@
       {
         \Hy at VerboseLinkStart{#1}{#2}
         \group_begin:
+        \tl_set:Nn \l_hyp_current_dest_name_tl {#2}
         \hook_use:n {hyp/link/#1}
         \@@_link_goto_begin:nw {#2}#3\Hy at xspace@end
-        \__hyp_link_goto_end:
+        \@@_link_goto_end:
         \group_end:
         \Hy at VerboseLinkStop
       }
@@ -2083,6 +2097,7 @@
       {
         \Hy at VerboseLinkStart{#1}{#2}% only for debug
         \group_begin:
+        \tl_set:Nn \l_hyp_current_dest_name_tl {#2}
         \hook_use:n {hyp/link/#1}
         \@@_link_goto_begin:nw {#2}
       }
@@ -2186,6 +2201,11 @@
             \pdfdict_put:nno {l_hyp/annot/A/GoToR}{D}{\l_@@_dest_name_tmpa_tl}
           }
         \mode_leave_vertical:
+%    \end{macrocode}
+% We use an extra object here, as ghostscript doesn't like the
+% object reference in the dict
+% \url{https://chat.stackexchange.com/transcript/message/57361080#57361080}
+%    \begin{macrocode}
         \pdf_object_unnamed_write:nx{dict}{\pdfdict_use:n {l_hyp/annot/A/GoToR}}
         \pdfannot_dict_put:nnx {link/GoToR}{A}{\pdf_object_ref_last:}
         \pdfannot_link:nxn %expansion??
@@ -4131,7 +4151,7 @@
 % clearly faster than removing them from a sequence
 \def\HyField at AuxAddToFields#1
   {
-    \prop_gput:Nnn \g__hyp_AcroForm_Fields_prop {#1}{F}
+    \prop_gput:Nnn \g_@@_AcroForm_Fields_prop {#1}{F}
   }%
 
 %fields with empty key get a value too -- lets hope that
@@ -4138,7 +4158,7 @@
 %this give the expected behaviour
 \def\HyField at AuxAddToCoFields #1 #2
   {
-    \prop_gput:Nnn \g__hyp_AcroForm_CoFields_prop {a#1}{#2}
+    \prop_gput:Nnn \g_@@_AcroForm_CoFields_prop {a#1}{#2}
   }
 
 \Hy at AtBeginDocument
@@ -4196,9 +4216,9 @@
 \ExplSyntaxOff
 \ExplSyntaxOn
 \tl_new:N  \l_@@_CheckmarkYes_tl
-\tl_set:Nn \l_@@_CheckmarkYes_tl {  __hyp_xform_CheckMarkYes }
+\tl_set:Nn \l_@@_CheckmarkYes_tl {  @@_xform_CheckMarkYes }
 \tl_new:N  \l_@@_CheckmarkOff_tl
-\tl_set:Nn \l_@@_CheckmarkOff_tl {  __hyp_xform_CheckMarkOff }
+\tl_set:Nn \l_@@_CheckmarkOff_tl {  @@_xform_CheckMarkOff }
 
 \def\@Form[#1]
   {
@@ -4207,14 +4227,14 @@
     \pdf at ifdraftmode{}
       {
         \Hy at FormObjects
-        \prop_map_inline:Nn \g__hyp_AcroForm_Fields_prop
+        \prop_map_inline:Nn \g_@@_AcroForm_Fields_prop
           {
             \pdfmanagement_add:nnx { Catalog / AcroForm } { Fields }{##1}
             %\pdfmanagement_show:n { Catalog / AcroForm }
           }
-        \prop_if_empty:NF \g__hyp_AcroForm_CoFields_prop
+        \prop_if_empty:NF \g_@@_AcroForm_CoFields_prop
           {
-            \prop_map_inline:Nn \g__hyp_AcroForm_CoFields_prop
+            \prop_map_inline:Nn \g_@@_AcroForm_CoFields_prop
               {
                 \seq_put_right:Nn \l_@@_tmpa_seq {##1}
               }
@@ -4230,7 +4250,7 @@
                 \pdfmanagement_add:nnx { Catalog / AcroForm }
                   { CO }
                   {
-                    \prop_item:Nn \g__hyp_AcroForm_CoFields_prop {##1}
+                    \prop_item:Nn \g_@@_AcroForm_CoFields_prop {##1}
                   }
              }
           }
@@ -4262,7 +4282,7 @@
          \char123
          \group_end:
        }
-       {__hyp_xform_Ding}
+       {@@_xform_Ding}
     \MakeFieldObject
        {
          \group_begin:
@@ -4274,7 +4294,7 @@
          \phantom{\char123}
          \group_end:
        }
-       {__hyp_xform_DingOff}
+       {@@_xform_DingOff}
      \MakeFieldObject
        {
          \group_begin:
@@ -4286,7 +4306,7 @@
          \char51
          \group_end:
        }
-       {__hyp_xform_CheckMarkYes}
+       {@@_xform_CheckMarkYes}
      \MakeFieldObject
        {
         \group_begin:
@@ -4298,17 +4318,17 @@
          \phantom{\char51} %perhaps xetex needs some small glyph ..
          \group_end:
        }
-       {__hyp_xform_CheckMarkOff}
+       {@@_xform_CheckMarkOff}
      \MakeFieldObject
        {
          \fbox{\textcolor{yellow}{\textsf{Submit}}} %color?
        }
-       {__hyp_xform_Submit}
+       {@@_xform_Submit}
      \MakeFieldObject
        {
          \fbox{\textcolor{yellow}{\textsf{SubmitP}}} %color?
        }
-       {__hyp_xform_SubmitP}
+       {@@_xform_SubmitP}
   }
 \ExplSyntaxOff
 \let\@endForm\ltx at empty
@@ -4324,16 +4344,16 @@
     %\zref at labelbyprops{HyAnn@\the\HyAnn at Count}{abspage}%
     %\zref at labelbylist {HyAnn@\the\HyAnn at Count} {l3pdf}
     %\zref at refused{HyAnn@\the\HyAnn at Count}%
-    \__hyp_ref_label:en {HyAnn@\the\HyAnn at Count}{abspage}
-    \__hyp_ref_check:en {HyAnn@\the\HyAnn at Count}{abspage}
+    \@@_ref_label:en {HyAnn@\the\HyAnn at Count}{abspage}
+    \@@_ref_check:en {HyAnn@\the\HyAnn at Count}{abspage}
   }%
 \def\Fld at pageobjref
   {
-    \__hyp_ref_if_exist:enT {HyAnn@\the\HyAnn at Count}{abspage}
+    \@@_ref_if_exist:enT {HyAnn@\the\HyAnn at Count}{abspage}
       {
         /P~\pdf_pageobject_ref:n
           {
-            \__hyp_ref_value:en{HyAnn@\the\HyAnn at Count}{abspage}
+            \@@_ref_value:en{HyAnn@\the\HyAnn at Count}{abspage}
           }
       }
   }
@@ -4449,7 +4469,7 @@
   \endgroup
 }
 \tl_new:N  \l_@@_RadioYes_tl
-\tl_set:Nn \l_@@_RadioYes_tl { __hyp_xform_Ding }
+\tl_set:Nn \l_@@_RadioYes_tl { @@_xform_Ding }
 \def\@@Radio#1{%
   \Fld at listcount=0~%
   %\show\Fld at default
@@ -4474,8 +4494,8 @@
          <<
          /N
           <<
-          /\@currValue\c_space_tl \pdfxform_ref:o {__hyp_xform_Ding}
-          %/Off \c_space_tl \pdfxform_ref:n {__hyp_xform_DingOff} %hm
+          /\@currValue\c_space_tl \pdfxform_ref:o {@@_xform_Ding}
+          %/Off \c_space_tl \pdfxform_ref:n {@@_xform_DingOff} %hm
           >>
          >>
       }
@@ -4569,8 +4589,8 @@
       {
         \PDFForm at Submit
         /AP<<
-          /N~\pdfxform_ref:n {__hyp_xform_Submit}~
-          /D~\pdfxform_ref:n {__hyp_xform_SubmitP}
+          /N~\pdfxform_ref:n {@@_xform_Submit}~
+          /D~\pdfxform_ref:n {@@_xform_SubmitP}
          >>
        }
       \HyField at AddToFields

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3backend-testphase.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -45,7 +45,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 %
@@ -56,27 +56,27 @@
 %    \begin{macrocode}
 %<drivers>\ProvidesExplFile
 %<*dvipdfmx>
-  {l3backend-testphase-dvipdfmx.def}{2021-06-29}{}
+  {l3backend-testphase-dvipdfmx.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
 %</dvipdfmx>
 %<*dvips>
-  {l3backend-testphase-dvips.def}{2021-06-29}{}
+  {l3backend-testphase-dvips.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
 %</dvips>
 %<*dvisvgm>
-  {l3backend-testphase-dvisvgm.def}{2021-06-29}{}
+  {l3backend-testphase-dvisvgm.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
 %</dvisvgm>
 %<*luatex>
-  {l3backend-testphase-luatex.def}{2021-06-29}{}
+  {l3backend-testphase-luatex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
 %</luatex>
 %<*pdftex>
-  {l3backend-testphase-pdftex.def}{2021-06-29}{}
+  {l3backend-testphase-pdftex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
 %</pdftex>
 %<*xdvipdfmx>
-  {l3backend-testphase-xetex.def}{2021-06-29}{}
+  {l3backend-testphase-xetex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
 %</xdvipdfmx>
 %    \end{macrocode}
@@ -106,11 +106,10 @@
 \cs_generate_variant:Nn \@@_backend_ref_value:nn {en}
 %</drivers>
 %    \end{macrocode}
+% avoid that destinations names are optimized with xelatex/dvipdfmx
+% see https://tug.org/pipermail/dvipdfmx/2019-May/000002.html
 %    \begin{macrocode}
 %<*dvipdfmx|xdvipdfmx>
-% avoid that destinations names are optimized.
-% is this still needed??
-% see https://tug.org/pipermail/dvipdfmx/2019-May/000002.html
     \__kernel_backend_literal:x { dvipdfmx:config~C~ 0x0010 }
 %</dvipdfmx|xdvipdfmx>
 %    \end{macrocode}
@@ -121,6 +120,7 @@
 \prop_new:N \g_@@_tmpa_prop
 \tl_new:N   \l_@@_tmpa_tl
 \box_new:N  \l_@@_backend_tmpa_box
+\box_new:N  \l_@@_backend_tmpb_box
 %</drivers>
 %    \end{macrocode}
 % \end{variable}
@@ -201,10 +201,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -211,10 +207,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 %</drivers>
@@ -561,21 +553,10 @@
 % \subsection{\enquote{Page/Resources}: ExtGState, ColorSpace, Shading, Pattern}
 % Path: Page/Resources/ExtGState etc. The actual output of the resources is handled
 % together with the bdc/Properties. Here is only special code.
-% \begin{macro}{\@@_backend_PageResources_gput:nnn}
-% stores values for the page resources.
-% \begin{arguments}
-% \item name of the resource (ExtGState, ColorSpace, Shading, Pattern)
-% \item a pdf name without slash
-% \item value
-% \end{arguments}
-% \begin{macro}{\@@_backend_PageResources_obj_gpush:}
-% This pushes out the objects. It is a no-op with xdvipdfmx and dvips.
-%    \begin{macrocode}
-% backend commands the command to fill the register
-% and to push the values.
-%
+% \begin{macro}{\c_@@_backend_PageResources_clist}
 % The names are quite often needed
 % a similar list is now in l3pdfmanagement. Perhaps it should be merged.
+%    \begin{macrocode}
 %<*drivers>
 \clist_const:Nn \c_@@_backend_PageResources_clist
   {
@@ -585,9 +566,25 @@
     Shading,
   }
 %</drivers>
-% pdftex and luatex
+%    \end{macrocode}
+% \end{macro}
+%
+% Now the backend commands the command to fill the register
+% and to push the values.
+%
+% \begin{macro}{\@@_backend_PageResources_gput:nnn}
+% stores values for the page resources.
+% \begin{arguments}
+% \item name of the resource (ExtGState, ColorSpace, Shading, Pattern)
+% \item a pdf name without slash
+% \item value
+% \end{arguments}
+% \begin{macro}{\@@_backend_PageResources_obj_gpush:}
+% This pushes out the objects. It should be a no-op with xdvipdfmx and dvips
+% as it currently issued in the end-of-run hook!
+% create the backend objects:
+%    \begin{macrocode}
 %<*pdftex|luatex>
- %create the backend objects:
 \clist_map_inline:Nn \c_@@_backend_PageResources_clist
   {
     \@@_backend_object_new:nn {@@/Page/Resources/#1} {dict}
@@ -602,12 +599,14 @@
       }
    }
 %</pdftex|luatex>
+%    \end{macrocode}
+% values are only stored in a prop and will be output at end document.
+% luatex must also trigger the lua side
+%    \begin{macrocode}
 %<*luatex>
-%values are only stored in a prop and will be output at end document.
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   {
     \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
-    % luatex must also trigger the lua side
     \tex_latelua:D{ltx.@@.Page.Resources.#1=true}
     \tex_latelua:D
       {
@@ -621,8 +620,10 @@
      \pdfdict_gput:nnn {g_@@_Core/Page/Resources/#1} { #2 }{ #3 }
    }
 %</pdftex>
+%    \end{macrocode}
+% code for end of document code
+%    \begin{macrocode}
 %<*pdftex|luatex>
-%code for end of document code
 \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush:
   {
     \clist_map_inline:Nn \c_@@_backend_PageResources_clist
@@ -637,15 +638,19 @@
      }
   }
 %</pdftex|luatex>
+%    \end{macrocode}
 % xdvipdfmx
 % \special{pdf:pageresources<<#1>>} doesn't work correctly with object names ...
 % https://tug.org/pipermail/dvipdfmx/2019-August/000021.html,
 % so we use \special{pdf:put @resources}
 % this must be issued on every page!
-%<*dvipdfmx|xdvipdfmx>
-%objects should not only be created but also "initialized"
+% objects should not only be created but also "initialized"
 % initialization should be done before anyone tries to write
 % so we add rules for the backend.
+% The push command should not be used as it is
+% in the wrong end document hook. If needed a new command must be added.
+%    \begin{macrocode}
+%<*dvipdfmx|xdvipdfmx>
 %<xdvipdfmx>\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-xetex}{after}{pdf}
 %<dvipdfmx>\hook_gset_rule:nnnn{shipout/firstpage}{l3backend-dvipdfmx}{after}{pdf}
 %
@@ -673,8 +678,11 @@
 
 \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {}
 %</dvipdfmx|xdvipdfmx>
+%    \end{macrocode}
+% dvips unneeded, or no-op. The push command should not be used as it is
+% in the wrong end document hook. If needed a new command must be added.
+%    \begin{macrocode}
 %<*dvips>
-% dvips unneeded, or no-op
 \cs_new_protected:Npn \@@_backend_PageResources:n #1 {}
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   { %only for the show command TEST!!
@@ -682,8 +690,10 @@
   }
 \cs_new_protected:Npn \@@_backend_PageResources_obj_gpush: {}
 %</dvips>
+%    \end{macrocode}
+% dvipsvgm unneeded, or no-op
+%    \begin{macrocode}
 %<*dvisvgm>
-% dvips unneeded, or no-op
 \cs_new_protected:Npn \@@_backend_PageResources:n #1 {}
 \cs_new_protected:Npn \@@_backend_PageResources_gput:nnn #1 #2 #3
   { %only for the show command TEST!!
@@ -725,23 +735,23 @@
 %
 \cs_set_protected:Npn \@@_backend_bdc:nn #1 #2 % #1 eg. Span, #2: dict_content
   {
-    \__pdf_backend_pdfmark:x{/#1~<<#2>>~/BDC}
+    \@@_backend_pdfmark:x{/#1~<<#2>>~/BDC}
   }
 \cs_set_protected:Npn \@@_backend_bdcobject:nn #1 #2 % #1 eg. Span, #2: object name
   {
-    \__pdf_backend_pdfmark:x{/#1~\@@_backend_object_ref:n{#2}~/BDC}
+    \@@_backend_pdfmark:x{/#1~\@@_backend_object_ref:n{#2}~/BDC}
   }
 \cs_set_protected:Npn \@@_backend_bdcobject:n #1  % #1 eg. Span,
   {
-    \__pdf_backend_pdfmark:x{/#1~\@@_backend_object_last:~/BDC}
+    \@@_backend_pdfmark:x{/#1~\@@_backend_object_last:~/BDC}
   }
 \cs_set_protected:Npn \@@_backend_emc:
   {
-    \__pdf_backend_pdfmark:n{/EMC} %
+    \@@_backend_pdfmark:n{/EMC} %
   }
 \cs_set_protected:Npn \@@_backend_bmc:n #1
   {
-    \__pdf_backend_pdfmark:n{/#1~/BMC} %
+    \@@_backend_pdfmark:n{/#1~/BMC} %
   }
 \cs_new_protected:Npn \@@_backend_PageResources_gpush:n #1 {}
 
@@ -1099,7 +1109,7 @@
   {
     \pdf_object_unnamed_write:nn {dict} { /Names [#1] }
     %n or x?
-    \__pdf_backend:x {put~@names~<</EmbeddedFiles~\pdf_object_ref_last: >>}
+    \@@_backend:x {put~@names~<</EmbeddedFiles~\pdf_object_ref_last: >>}
   }
 %</dvipdfmx|xdvipdfmx>
 
@@ -1472,6 +1482,109 @@
 \cs_new_protected:Npn \@@_backend_xform_use:n #1 {}
 \cs_new:Npn \@@_backend_xform_ref:n {}
 %</dvisvgm>
+%    \end{macrocode}
+% The xform code for dvips is based on code from the attachfile2 package
+% (in atfi-dvips), along with some ideas from pdfbase and has been corrected
+% with the help of Alexander Grahn.
+% Details like clipping and landscape will probably be corrected in the future.
+%    \begin{macrocode}
+%<*dvips>
+\cs_new_protected:Npn\@@_backend_xform_new:nnnn #1 #2 #3 #4 % #1 name, #2 attribute, #4  content
+  {
+    \int_gincr:N \g_@@_backend_object_int
+    \int_const:cn
+      { c_@@_backend_xform_ \tl_to_str:n {#1} _int }
+      { \g_@@_backend_object_int }
+
+    \hbox_set:Nn \l_@@_backend_tmpa_box
+      {
+        \bool_set_true:N \l_@@_backend_xform_bool
+        \prop_gclear:c {\__kernel_pdfdict_name:n { g_@@_Core/Xform/Resources/Properties }}
+        #4
+      }
+   %store the dimensions
+    \tl_const:cx
+      { c_@@_backend_xform_wd_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_wd:N \l_@@_backend_tmpa_box }
+    \tl_const:cx
+      { c_@@_backend_xform_ht_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_ht:N \l_@@_backend_tmpa_box }
+    \tl_const:cx
+      { c_@@_backend_xform_dp_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_dp:N \l_@@_backend_tmpa_box }
+    %mirror the box
+    \box_scale:Nnn \l_@@_backend_tmpa_box {1} {-1}
+    \hbox_set:Nn\l_@@_backend_tmpb_box
+      {
+        \__kernel_backend_postscript:x
+          {
+            gsave~currentpoint~translate~
+            mark~
+            /_objdef~{ pdf.obj \int_use:N\g_@@_backend_object_int }\c_space_tl~
+            /BBox[
+            currentpoint~\dim_to_decimal:n{\box_dp:N \l_@@_backend_tmpa_box}~72.27~div~VResolution~mul~add~
+            currentpoint~
+              exch~\dim_to_decimal:n{\box_wd:N \l_@@_backend_tmpa_box}~72.27~div~Resolution~mul~add~
+              exch~\dim_to_decimal:n{\box_ht:N \l_@@_backend_tmpa_box}~72.27~div~VResolution~mul~sub~
+             ]
+             \str_if_eq:eeF{#1}{}
+              {
+                product~(Distiller)~search~{pop~pop~pop~#2}{pop}ifelse~
+              }
+             /BP~pdfmark~grestore~
+          }
+        \box_use_drop:N\l_@@_backend_tmpa_box
+        \__kernel_backend_postscript:n
+          {
+            mark ~ /EP~pdfmark
+          }
+       \str_if_eq:eeF{#1}{}
+         {
+           \__kernel_backend_postscript:x
+             {
+               product~(Ghostscript)~search~
+                {
+                  pop~pop~pop~
+                  mark~
+                  { pdf.obj \int_use:c{c_@@_backend_xform_ \tl_to_str:n {#1} _int} }
+                    ~<<#2>>~/PUT~pdfmark
+                 }{pop}ifelse
+              }
+          }
+      }
+    \box_set_dp:Nn \l_@@_backend_tmpb_box { \c_zero_dim }
+    \box_set_ht:Nn \l_@@_backend_tmpb_box { \c_zero_dim }
+    \box_set_wd:Nn \l_@@_backend_tmpb_box { \c_zero_dim }
+    \hook_gput_code:nnn {begindocument/end}{pdfxform}
+      {
+       \mode_leave_vertical:
+       \box_use:N\l_@@_backend_tmpb_box
+      }
+  }
+
+
+\cs_new_protected:Npn \@@_backend_xform_use:n #1
+  {
+    \hbox_set:Nn \l_@@_backend_tmpa_box
+      {
+        \__kernel_backend_postscript:x
+         {
+           gsave~currentpoint~translate~1~-1~scale~
+           mark~{ pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int }}~
+          /SP~pdfmark ~ grestore
+         }
+      }
+    \box_set_wd:Nn  \l_@@_backend_tmpa_box { \pdfxform_wd:n { #1 } }
+    \box_set_ht:Nn  \l_@@_backend_tmpa_box { \pdfxform_ht:n { #1 } }
+    \box_set_dp:Nn  \l_@@_backend_tmpa_box { \pdfxform_dp:n { #1 } }
+    \box_use_drop:N \l_@@_backend_tmpa_box
+  }
+\cs_new:Npn \@@_backend_xform_ref:n #1
+  {
+    { pdf.obj \int_use:c{c_@@_backend_xform_ \tl_to_str:n {#1} _int} }
+  }
+
+%</dvips>
 %<*drivers>
 %% all
 \prg_new_conditional:Npnn \@@_backend_xform_if_exist:n #1 { p , T , F , TF }

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfannot.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -52,7 +52,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -67,6 +67,33 @@
 % and link annotations. Commands for other annotations like widgets will be added
 % later.
 %
+% \subsection{dvips specialities}
+% With most engines and backend the content of arguments like \Arg{annot spec}
+% are dictionaries with keys and values which looks like the PDF.
+% With dvips this is different. As it write at first a postscript file which is
+% then interpreted along the rule of the pdfmark reference (and the rules of the postscript
+% language) the handling is in some parts so different that it is difficult to hide
+% this in abstraction like the one of this module.
+% And there is the additional complication that the
+% two postscript processor ghostscript (ps2pdf) and distiller handles some code differently too.
+%
+% For now the following differences have been spotted, it is yet not quite clear
+% how to resolve them
+% \begin{itemize}
+% \item distiller doesn't like it if the action is provided by directly
+% providing the |/A| key with some values.
+% Instead it expects a keyword \texttt{/Action}, which it will
+% then translate to |/A|. For |GoTo| links this has been resolved at the backend level,
+% but for other link types this problem is open.
+% \item ghostscript doesn't like object references as values in some places.
+% The work around here (which is e.g. used by hyperref for GoToR link) is to
+% write the whole dictionary first as an object and to use its reference, but this
+% is something distiller doesn't like, sigh.
+% \item How to escaping text and create unicode can be different.
+% \end{itemize}
+%
+%
+%
 % \subsection{General annotation commands}
 %
 % \begin{function}[added = 2019-09-05, updated = 2020-04-14]
@@ -397,7 +424,7 @@
 %    \begin{macrocode}
 %<@@=pdfannot>
 %<*header>
-\ProvidesExplPackage{l3pdfannot}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdfannot}{2021-07-21}{0.95g}
   {PDF-annotations}
 \RequirePackage{l3pdfdict}
 %</header>

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfdict.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -212,7 +212,7 @@
 %    \begin{macrocode}
 %<@@=pdfdict>
 %<*header>
-\ProvidesExplPackage{l3pdfdict}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdfdict}{2021-07-21}{0.95g}
   {Tools for PDF dictionaries (LaTeX PDF management testphase bundle)}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-action.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-checkbox.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -68,7 +68,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-choice.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-pushbutton.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -59,7 +59,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -77,6 +77,8 @@
 % itself
 % \item Standards like pdf/A disable features of form fields too
 % (as you typically can't change the PDF).
+% \item The compilations involving postscript/pdfmark (dvips with ps2pdf or dvips
+% with distiller) can require special setups.
 % \end{itemize}
 % \section{Pushbuttons}
 % Click me:
@@ -89,7 +91,17 @@
 %  \pdffield_pushbutton:n{name=bear,appearance=pdffield/bear,width=23pt,height=30pt,depth=10pt}
 %  \group_end:
 % \ExplSyntaxOff
-%
+%^^A  ps2pdf doesn't like the I\'m, need to find out the right escape.
+%^^A  ps2pdf also requires an indirection (but distiller will probably require /Action
+%^^A instead of /A)
+%^^A  \group_begin:
+%^^A  \tl_set:Nn\l_tmpa_tl{app.alert('Hello!~Im~Bär!',3,0);}
+%^^A  \regex_replace_once:nnN{ä}{\x5Cu00E4}\l_tmpa_tl{}
+%^^A  \pdf_object_unnamed_write:nx{stream}{{}{\exp_not:o{\l_tmpa_tl}}}
+%^^A  \pdf_object_unnamed_write:nx{dict}{/S/JavaScript /JS~\pdf_object_ref_last:}
+%^^A  \pdfannot_dict_put:nnx{widget}{A}{\pdf_object_ref_last:}
+%^^A  \pdffield_pushbutton:n{name=bear,appearance=pdffield/bear,width=23pt,height=30pt,depth=10pt}
+%^^A  \group_end:%
 % \bigskip
 % \subsection{Commands}
 % \begin{function}{\pdffield_push:n}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-radiobutton.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -87,7 +87,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield-textfield.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffield.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -73,7 +73,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -970,7 +970,7 @@
 %<*package>
 %<@@=pdffield>
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-testphase}{2021-06-29}{0.95f}%
+\ProvidesExplPackage{l3pdffield-testphase}{2021-07-21}{0.95g}%
   {form fields}
 %    \end{macrocode}
 % \subsection{hyperref specific command}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdffile.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -400,7 +400,7 @@
 %
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage{l3pdffile}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdffile}{2021-07-21}{0.95g}
   {embedding and referencing files in PDF---LaTeX PDF management testphase bundle}
 \RequirePackage{l3pdftools}  %temporarly!!
 %</header>

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmanagement.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -61,7 +61,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -557,7 +557,7 @@
 %<@@=pdfmanagement>
 %<*header>
 %
-\ProvidesExplPackage{l3pdfmanagement}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdfmanagement}{2021-07-21}{0.95g}
   {Management of core PDF dictionaries (LaTeX PDF management testphase bundle)}
 %</header>
 %    \end{macrocode}
@@ -672,18 +672,11 @@
        }
   }
 
-\tl_gset:Nn \g__kernel_pdfmanagement_lastpage_shipout_code_tl
+\tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl
   {
     \bool_if:NT \g_@@_active_bool
        {
          \__pdf_backend_PageResources_obj_gpush:          %ExtGState etc
-       }
-  }
-
-\tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl
-  {
-    \bool_if:NT \g_@@_active_bool
-       {
          \@@_Pages_gpush:            %pagesattr
          \@@_Info_gpush:             %pdfinfo
          \@@_Catalog_gpush:

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfmeta.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -343,7 +343,7 @@
 %    \begin{macrocode}
 %<@@=pdfmeta>
 %<*header>
-\ProvidesExplPackage{l3pdfmeta}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdfmeta}{2021-07-21}{0.95g}
   {PDF-Standards---LaTeX PDF management testphase bundle}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdftools.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -53,7 +53,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -215,7 +215,7 @@
 %
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplPackage{l3pdftools}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdftools}{2021-07-21}{0.95g}
   {candidate commands for l3pdf---LaTeX PDF management testphase bundle}
 %</header>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/l3pdfxform.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -52,7 +52,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -61,8 +61,11 @@
 % This module contains a number of commands to create \enquote{form XObjects},
 % for which pdf\TeX{} introduced the short name \enquote{xforms}.
 %
-% The status is still beta, so the style itself is currently named
-% \pkg{l3pdfxform-beta}. Missing is for example code for the dvips route.
+% The status is still beta.
+% The dvips route is now better supported but there are open issus
+% if landscape pages are involved or if the objects are larger than the page.
+% With dvips the creation of a form involves typesetting and so can affect spacing.
+%
 % Probably some of the function will also need to be enhanced by hooks.
 %
 %  \begin{function}[added = 2019-08-05,updated=2021-02-14]
@@ -120,7 +123,7 @@
 %     }
 %   \begin{syntax}
 %     \cs{pdfxform_if_exist_p:n} \Arg{name}
-%     \cs{pdfxform_if_exist:NTF} \meta{name} \Arg{true code} \Arg{false code}
+%     \cs{pdfxform_if_exist:nTF} \meta{name} \Arg{true code} \Arg{false code}
 %   \end{syntax}
 %    These command tests if an xform with name \Arg{name} has been already defined.
 %   \end{function}%
@@ -133,7 +136,7 @@
 %    \begin{macrocode}
 %<@@=pdf>
 %<*header>
-\ProvidesExplPackage{l3pdfxform}{2021-06-29}{0.95f}
+\ProvidesExplPackage{l3pdfxform}{2021-07-21}{0.95g}
   {command to create xforms (beta)---LaTeX PDF management testphase bundle}
 %</header>
 %    \end{macrocode}
@@ -195,6 +198,9 @@
   }
 %    \end{macrocode}
 % \end{macro}
+% \begin{macro}[pTF]{\pdfxform_if_exist:n}
+% The command is defined in the backend (to avoid timing problems).
+% \end{macro}
 %    \begin{macrocode}
 %</package>
 %    \end{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/ltdocinit.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -51,7 +51,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -115,9 +115,24 @@
 %    are described in the documentation of \pkg{l3pdfmeta}.
 %    \item[\texttt{pdfmanagement}] Boolean. This activates/deactivates
 %      the core management code. By default the value is true.
-%    \item[firstaidoff] This accepts a comma lists of keysword and disable the patches
+%    \item[\texttt{firstaidoff}] This accepts a comma lists of keysword and disable the patches
 %    related to them. More information can be found in the documentation of
 %    \pkg{pdfmanagement-firstaid}.
+%    \item[\texttt{testphase}] This key is used to load testphase code. The values it accepts
+%    and their effect will change over time, when testphase packages are added or
+%    removed when the code is moved into the kernel. Currently the accepted values are
+%    \texttt{tagpdf}, this load the tagpdf package, \texttt{headings}, this loads
+%    code which reimplements heading commands, and \texttt{ptagging} this loads code
+%    to allow paragraph tagging to work with engine other than luatex.
+%    \item[\texttt{activate}] This key is used to enable some document wide functions. It is
+%    currently in an experimental state. The values and their behaviour are subject to change.
+%    Currently the only value is |tagging|,
+%    which will do |\tagpdfsetup{activate,paratagging,interwordspace}|. It requires that
+%    \pkg{tagpdf} has been loaded first with the |testphase| key.
+%    \item[\texttt{debug}] This key activates some debug options. Currently only the
+%    keys |para| (with the default and only value |show|),
+%    and |log| (with the values of \pkg{tagpdf}) and |uncompress| (which does the same
+%    as |uncompress| as main key)  are known.
 % \end{description}
 %
 % \subsection{Container for document properties}
@@ -167,7 +182,7 @@
 %    \begin{macrocode}
 %<@@=pdfmanagement>
 %<*header>
-\ProvidesExplPackage{ltdocinit}{2021-06-29}{0.95f}
+\ProvidesExplPackage{ltdocinit}{2021-07-21}{0.95g}
   {Initialize document metadata}
 %</header>
 %    \end{macrocode}
@@ -235,8 +250,9 @@
              }
           }
 %    \end{macrocode}
-% Load more modules and the firstaid code.
+% Load more modules, the testphase code and the firstaid code.
 %    \begin{macrocode}
+        \g_@@_testphase_tl
         \RequirePackage{pdfmanagement-firstaid}
       }
   }
@@ -296,7 +312,14 @@
 \clist_new:N \g_@@_firstaidoff_clist
 %    \end{macrocode}
 % \end{variable}
+%  \begin{variable}{\g_@@_testphase_tl}
+%  a tl to store the testphase loading code so that we can load them at
+%  the end of the command.
 %    \begin{macrocode}
+\tl_new:N \g_@@_testphase_tl
+%    \end{macrocode}
+% \end{variable}
+%    \begin{macrocode}
 \keys_define:nn { document / metadata }
   {
     backend .code:n =
@@ -346,6 +369,78 @@
       }
     ,pdfmanagement .bool_gset:N = \g_@@_active_bool
     ,firstaidoff .clist_gset:N = \g_@@_firstaidoff_clist
+    ,testphase .multichoice:
+    ,testphase / tagpdf .code:n =
+      {
+        \tl_gput_right:Nn\g_@@_testphase_tl
+          {
+            \RequirePackage{tagpdf}
+            \AddToDocumentProperties [document]{testphase/tagpdf}{loaded}
+          }
+      }
+    ,testphase / headings .code:n =
+      {
+        \tl_gput_right:Nn\g_@@_testphase_tl
+          {
+            \RequirePackage{headings-testphase}
+            \AddToDocumentProperties [document]{testphase/headings}{loaded}
+          }
+      }
+    ,testphase / ptagging .code:n =
+      {
+        \tl_gput_right:Nn\g_@@_testphase_tl
+          {
+            \AddToHook{class/after}
+              {
+                \RequirePackage{ptagging-testphase}
+                \AddToDocumentProperties [document]{testphase/ptagging}{loaded}
+              }
+          }
+      }
+    ,testphase / unknown .code:n =
+      {
+        \tl_gput_right:Nn\g_@@_testphase_tl
+           {
+             \AddToHook{class/after}
+               {
+                 \RequirePackage{#1-testphase}
+                 \AddToDocumentProperties [document]{testphase/#1}{loaded}
+               }
+           }
+      }
+    ,activate .multichoice:
+    ,activate / tagging .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{activate,paratagging,interwordspace}
+            \AddToDocumentProperties [document]{tagging}{active}
+            \AddToDocumentProperties [document]{tagging/para}{active}
+            \AddToDocumentProperties [document]{tagging/interwordspace}{active}
+          }
+      }
+    ,debug .code:n =
+      {
+        \keys_set:nn { document / metadata / debug } {#1}
+      }
+    ,debug / para .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{paratagging-show}
+          }
+      }
+    ,debug / log .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{log=#1}
+          }
+      }
+    ,debug / uncompress .code:n =
+      {
+        \pdf_uncompress:
+      }
   }
 %    \end{macrocode}
 %    \begin{macrocode}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-firstaid.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -51,7 +51,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -67,7 +67,7 @@
 % |firstaidoff={name1,name2,...}|.
 %    \begin{macrocode}
 %<*package>
-\ProvidesExplPackage{pdfmanagement-firstaid}{2021-06-29}{0.95f}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-21}{0.95g}
   {LaTeX PDF management testphase bundle / firstaid-patches}
 
 %<@@=pdfmanagement>
@@ -108,8 +108,6 @@
 %  This patch serves also as test to check if this change can be safely
 %  added to \pkg{color} later.
 %    \begin{macrocode}
-\@ifundefined{color_set:nn}{
-\RequirePackage{l3color}}{}
 \bool_if:NT \g_@@_firstaid_color_bool
   {
     \declare at file@substitution{color.sty}{color-ltx.sty}
@@ -127,8 +125,6 @@
 %  The |named| model is mapped to \cs{color_set:nn}.
 %
 %    \begin{macrocode}
-\@ifundefined{color_set:nn}{
-\RequirePackage{l3color}}{}
 \bool_if:NT \g_@@_firstaid_xcolor_bool
   {
     \AddToHook{package/after/xcolor}

Modified: trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx
===================================================================
--- trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/source/latex/pdfmanagement-testphase/pdfmanagement-testphase.dtx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -51,7 +51,7 @@
 %    }^^A
 % }
 %
-% \date{Version 0.95f, released 2021-06-29}
+% \date{Version 0.95g, released 2021-07-21}
 %
 % \maketitle
 % \begin{documentation}
@@ -384,7 +384,7 @@
 %    \begin{macrocode}
 %<@@=pdf>
 %<*package>
-\ProvidesExplPackage{pdfmanagement-testphase}{2021-06-29}{0.95f}
+\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-21}{0.95g}
   {LaTeX PDF management testphase bundle}
 \providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
 \IfFormatAtLeastTF{2020-10-01}{}{
@@ -411,7 +411,7 @@
 % to allow to set it in the document.
 %    \begin{macrocode}
 %<*header>
-\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-06-29}{0.95f}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-21}{0.95g}
   {PDF~management~code~(testphase)}
 %</header>
 %<*package>

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/color-ltx.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -22,7 +22,7 @@
 %% This file has the LPPL maintenance status "maintained".
 %%
 \NeedsTeXFormat{LaTeX2e}[1995/12/01]
-\ProvidesPackage{color-ltx}[2021-06-29 v0.95f
+\ProvidesPackage{color-ltx}[2021-07-21 v0.95g
   Standard LaTeX Color (patched for l3color, part of pdfmanagement-testphase, original version 2021/03/07 v1.2e) (DPC)]
 \edef\Gin at codes{%
  \catcode`\noexpand\^^A\the\catcode`\^^A\relax

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hgeneric-testphase.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: hyperref-generic.dtx
-\ProvidesFile{hgeneric-testphase.def}[2021-06-29 v0.95f %
+\ProvidesFile{hgeneric-testphase.def}[2021-07-21 v0.95g %
   generic Hyperref driver for the LaTeX PDF management testphase bundle]
 
 \RequirePackage{etoolbox} %why?
@@ -324,7 +324,7 @@
 
 \cs_new_protected:Npn \__hyp_href_run_aux:nn #1 #2
   {
-    \exp_args:Nnno\hyper at linklaunch{#2}{#1}{\l__hyp_href_run_parameter_tl}
+    \exp_args:Nnno\hyper at linklaunch{#1}{#2}{\l__hyp_href_run_parameter_tl}
     \group_end:
     \hook_use:n{cmd/hrefrun/after}
   }
@@ -582,10 +582,14 @@
     \Hy at RestoreLastskip   %defined in hyperref
     \mode_if_horizontal:T { \spacefactor\@savsf }
   }
+\tl_new:N\l_hyp_current_dest_name_tl
+\hook_new:n{hyp/anchor}
 \cs_new_protected:Npn \hyper at anchor #1
   {
     \exp_args:NnV
       \__hyp_destination:nn {#1} \l__hyp_dest_pdfview_tl
+    \tl_set:Nn \l_hyp_current_dest_name_tl {#1}
+    \hook_use:n{hyp/anchor}
   }
 
 \cs_new_protected:Npn \hyper at anchorstart #1
@@ -593,6 +597,8 @@
     \Hy at activeanchortrue
     \exp_args:NnV
       \__hyp_destination:nn {#1} \l__hyp_dest_pdfview_tl
+    \tl_set:Nn \l_hyp_current_dest_name_tl {#1}
+    \hook_use:n{hyp/anchor}
   }
 
 \cs_new_protected:Npn \hyper at anchorend
@@ -633,6 +639,7 @@
       {
         \Hy at VerboseLinkStart{#1}{#2}
         \group_begin:
+        \tl_set:Nn \l_hyp_current_dest_name_tl {#2}
         \hook_use:n {hyp/link/#1}
         \__hyp_link_goto_begin:nw {#2}#3\Hy at xspace@end
         \__hyp_link_goto_end:
@@ -648,6 +655,7 @@
       {
         \Hy at VerboseLinkStart{#1}{#2}% only for debug
         \group_begin:
+        \tl_set:Nn \l_hyp_current_dest_name_tl {#2}
         \hook_use:n {hyp/link/#1}
         \__hyp_link_goto_begin:nw {#2}
       }

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/hyperxmp-patches-tmp-ltx.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -19,7 +19,7 @@
 %
 % for those people who are interested.
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-06-29}{0.95f}
+\ProvidesExplPackage{hyperxmp-patches-tmp-ltx}{2021-07-21}{0.95g}
   {Store hyperref metadata in XMP format / temporay patches to test pdfresource management ... UF}
 
 \cs_if_exist:NT \pdfmanagement_add:nnn

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvipdfmx.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-dvipdfmx.def}{2021-06-29}{}
+  {l3backend-testphase-dvipdfmx.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvipdfmx}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -41,6 +41,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -59,10 +60,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -69,10 +66,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvips.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-dvips.def}{2021-06-29}{}
+  {l3backend-testphase-dvips.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvips}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -40,6 +40,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -58,10 +59,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -68,10 +65,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \cs_new_protected:Npx \__pdf_backend_Pages_primitive:n #1
@@ -184,6 +177,100 @@
             /EMBED
           }
       }
+\cs_new_protected:Npn\__pdf_backend_xform_new:nnnn #1 #2 #3 #4 % #1 name, #2 attribute, #4  content
+  {
+    \int_gincr:N \g__pdf_backend_object_int
+    \int_const:cn
+      { c__pdf_backend_xform_ \tl_to_str:n {#1} _int }
+      { \g__pdf_backend_object_int }
+
+    \hbox_set:Nn \l__pdf_backend_tmpa_box
+      {
+        \bool_set_true:N \l__pdf_backend_xform_bool
+        \prop_gclear:c {\__kernel_pdfdict_name:n { g__pdf_Core/Xform/Resources/Properties }}
+        #4
+      }
+   %store the dimensions
+    \tl_const:cx
+      { c__pdf_backend_xform_wd_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_wd:N \l__pdf_backend_tmpa_box }
+    \tl_const:cx
+      { c__pdf_backend_xform_ht_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_ht:N \l__pdf_backend_tmpa_box }
+    \tl_const:cx
+      { c__pdf_backend_xform_dp_ \tl_to_str:n {#1} _tl }
+      { \tex_the:D \box_dp:N \l__pdf_backend_tmpa_box }
+    %mirror the box
+    \box_scale:Nnn \l__pdf_backend_tmpa_box {1} {-1}
+    \hbox_set:Nn\l__pdf_backend_tmpb_box
+      {
+        \__kernel_backend_postscript:x
+          {
+            gsave~currentpoint~translate~
+            mark~
+            /_objdef~{ pdf.obj \int_use:N\g__pdf_backend_object_int }\c_space_tl~
+            /BBox[
+            currentpoint~\dim_to_decimal:n{\box_dp:N \l__pdf_backend_tmpa_box}~72.27~div~VResolution~mul~add~
+            currentpoint~
+              exch~\dim_to_decimal:n{\box_wd:N \l__pdf_backend_tmpa_box}~72.27~div~Resolution~mul~add~
+              exch~\dim_to_decimal:n{\box_ht:N \l__pdf_backend_tmpa_box}~72.27~div~VResolution~mul~sub~
+             ]
+             \str_if_eq:eeF{#1}{}
+              {
+                product~(Distiller)~search~{pop~pop~pop~#2}{pop}ifelse~
+              }
+             /BP~pdfmark~grestore~
+          }
+        \box_use_drop:N\l__pdf_backend_tmpa_box
+        \__kernel_backend_postscript:n
+          {
+            mark ~ /EP~pdfmark
+          }
+       \str_if_eq:eeF{#1}{}
+         {
+           \__kernel_backend_postscript:x
+             {
+               product~(Ghostscript)~search~
+                {
+                  pop~pop~pop~
+                  mark~
+                  { pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int} }
+                    ~<<#2>>~/PUT~pdfmark
+                 }{pop}ifelse
+              }
+          }
+      }
+    \box_set_dp:Nn \l__pdf_backend_tmpb_box { \c_zero_dim }
+    \box_set_ht:Nn \l__pdf_backend_tmpb_box { \c_zero_dim }
+    \box_set_wd:Nn \l__pdf_backend_tmpb_box { \c_zero_dim }
+    \hook_gput_code:nnn {begindocument/end}{pdfxform}
+      {
+       \mode_leave_vertical:
+       \box_use:N\l__pdf_backend_tmpb_box
+      }
+  }
+
+\cs_new_protected:Npn \__pdf_backend_xform_use:n #1
+  {
+    \hbox_set:Nn \l__pdf_backend_tmpa_box
+      {
+        \__kernel_backend_postscript:x
+         {
+           gsave~currentpoint~translate~1~-1~scale~
+           mark~{ pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int }}~
+          /SP~pdfmark ~ grestore
+         }
+      }
+    \box_set_wd:Nn  \l__pdf_backend_tmpa_box { \pdfxform_wd:n { #1 } }
+    \box_set_ht:Nn  \l__pdf_backend_tmpa_box { \pdfxform_ht:n { #1 } }
+    \box_set_dp:Nn  \l__pdf_backend_tmpa_box { \pdfxform_dp:n { #1 } }
+    \box_use_drop:N \l__pdf_backend_tmpa_box
+  }
+\cs_new:Npn \__pdf_backend_xform_ref:n #1
+  {
+    { pdf.obj \int_use:c{c__pdf_backend_xform_ \tl_to_str:n {#1} _int} }
+  }
+
 %% all
 \prg_new_conditional:Npnn \__pdf_backend_xform_if_exist:n #1 { p , T , F , TF }
   {

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-dvisvgm.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-dvisvgm.def}{2021-06-29}{}
+  {l3backend-testphase-dvisvgm.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: dvisvgm}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -40,6 +40,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -54,10 +55,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -64,10 +61,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-luatex.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-luatex.def}{2021-06-29}{}
+  {l3backend-testphase-luatex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (LuaTeX)}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -40,6 +40,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -59,10 +60,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -69,10 +66,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \sys_if_engine_luatex:T
@@ -158,7 +151,6 @@
     Pattern,
     Shading,
   }
- %create the backend objects:
 \clist_map_inline:Nn \c__pdf_backend_PageResources_clist
   {
     \__pdf_backend_object_new:nn {__pdf/Page/Resources/#1} {dict}
@@ -175,7 +167,6 @@
 \cs_new_protected:Npn \__pdf_backend_PageResources_gput:nnn #1 #2 #3
   {
     \pdfdict_gput:nnn {g__pdf_Core/Page/Resources/#1} { #2 }{ #3 }
-    % luatex must also trigger the lua side
     \tex_latelua:D{ltx.__pdf.Page.Resources.#1=true}
     \tex_latelua:D
       {

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-pdftex.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-pdftex.def}{2021-06-29}{}
+  {l3backend-testphase-pdftex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: PDF output (pdfTeX)}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -40,6 +40,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -58,10 +59,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -68,10 +65,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1
@@ -132,7 +125,6 @@
     Pattern,
     Shading,
   }
- %create the backend objects:
 \clist_map_inline:Nn \c__pdf_backend_PageResources_clist
   {
     \__pdf_backend_object_new:nn {__pdf/Page/Resources/#1} {dict}

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3backend-testphase-xetex.def	2021-07-22 20:40:06 UTC (rev 60016)
@@ -20,7 +20,7 @@
 %% 
 %% File: l3backend-testphase.dtx
 \ProvidesExplFile
-  {l3backend-testphase-xetex.def}{2021-06-29}{}
+  {l3backend-testphase-xetex.def}{2021-07-21}{}
   {LaTeX~PDF~management~testphase~bundle~backend~support: XeTeX}
 \RequirePackage{l3ref-tmp}
 \cs_generate_variant:Nn \ref_label:nn {en}
@@ -41,6 +41,7 @@
 \prop_new:N \g__pdf_tmpa_prop
 \tl_new:N   \l__pdf_tmpa_tl
 \box_new:N  \l__pdf_backend_tmpa_box
+\box_new:N  \l__pdf_backend_tmpb_box
 \int_new:N \g__pdf_backend_resourceid_int
 \int_new:N \g__pdf_backend_name_int
 \int_new:N \g__pdf_backend_page_int
@@ -59,10 +60,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \tl_gput_left:Nn\@kernel at after@shipout at lastpage
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
   {
     \hook_gput_code:nnn{shipout/background}{pdf}
@@ -69,10 +66,6 @@
       {
         \g__kernel_pdfmanagement_thispage_shipout_code_tl
       }
-    \hook_gput_code:nnn {shipout/lastpage} {pdf}
-      {
-        \g__kernel_pdfmanagement_lastpage_shipout_code_tl
-      }
   }
 
 \cs_new_protected:Npn \__pdf_backend_Pages_primitive:n #1

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/l3pdffield-testphase.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -27,7 +27,7 @@
 %% File: l3pdffield.dtx
 
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{l3pdffield-testphase}{2021-06-29}{0.95f}%
+\ProvidesExplPackage{l3pdffield-testphase}{2021-07-21}{0.95g}%
   {form fields}
 \csname HyField at NeedAppearancesfalse\endcsname % suppress NeedAppearances
 \str_new:N \l__pdffield_tmpa_str

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdflscape-ltx.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -22,7 +22,7 @@
 %% This work consists of the main source file pdflscape-ltx.sty
 %%
 \NeedsTeXFormat{LaTeX2e}
-\ProvidesExplPackage{pdflscape-ltx}{2021-06-29}{0.95f}
+\ProvidesExplPackage{pdflscape-ltx}{2021-07-21}{0.95g}
  {Display of landscape pages in PDF - adaption of pdflscape to the PDFmanagement bundle (testphase)}
 
 \DeclareOption*{\PassOptionsToPackage\CurrentOption{graphics}}

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-firstaid.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: pdfmanagement-firstaid.dtx
-\ProvidesExplPackage{pdfmanagement-firstaid}{2021-06-29}{0.95f}
+\ProvidesExplPackage{pdfmanagement-firstaid}{2021-07-21}{0.95g}
   {LaTeX PDF management testphase bundle / firstaid-patches}
 
 \clist_map_inline:nn {pgf,transparent,hyperxmp,pdflscape,xcolor,color,beamer}
@@ -40,14 +40,10 @@
   {
     \color_set:nnn{.5~.5~.5}{rgb}{0.5,0.5,0.5}
   }
-\@ifundefined{color_set:nn}{
-\RequirePackage{l3color}}{}
 \bool_if:NT \g__pdfmanagement_firstaid_color_bool
   {
     \declare at file@substitution{color.sty}{color-ltx.sty}
   }
-\@ifundefined{color_set:nn}{
-\RequirePackage{l3color}}{}
 \bool_if:NT \g__pdfmanagement_firstaid_xcolor_bool
   {
     \AddToHook{package/after/xcolor}

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.ltx	2021-07-22 20:40:06 UTC (rev 60016)
@@ -27,7 +27,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: pdfmanagement-testphase.dtx
-\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-06-29}{0.95f}
+\ProvidesExplFile{pdfmanagement-testphase.ltx}{2021-07-21}{0.95g}
   {PDF~management~code~(testphase)}
 %% File: l3pdfdict.dtx
 \cs_new:Npn \__pdfdict_get_type:n #1
@@ -345,18 +345,11 @@
        }
   }
 
-\tl_gset:Nn \g__kernel_pdfmanagement_lastpage_shipout_code_tl
+\tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl
   {
     \bool_if:NT \g__pdfmanagement_active_bool
        {
          \__pdf_backend_PageResources_obj_gpush:          %ExtGState etc
-       }
-  }
-
-\tl_gset:Nn \g__kernel_pdfmanagement_end_run_code_tl
-  {
-    \bool_if:NT \g__pdfmanagement_active_bool
-       {
          \__pdfmanagement_Pages_gpush:            %pagesattr
          \__pdfmanagement_Info_gpush:             %pdfinfo
          \__pdfmanagement_Catalog_gpush:
@@ -958,6 +951,7 @@
                \str_remove_all:cn {opt at hyperref.sty}{customdriver=hgeneric-testphase}
              }
           }
+        \g__pdfmanagement_testphase_tl
         \RequirePackage{pdfmanagement-firstaid}
       }
   }
@@ -988,6 +982,7 @@
       }
   }
 \clist_new:N \g__pdfmanagement_firstaidoff_clist
+\tl_new:N \g__pdfmanagement_testphase_tl
 \keys_define:nn { document / metadata }
   {
     backend .code:n =
@@ -1037,6 +1032,78 @@
       }
     ,pdfmanagement .bool_gset:N = \g__pdfmanagement_active_bool
     ,firstaidoff .clist_gset:N = \g__pdfmanagement_firstaidoff_clist
+    ,testphase .multichoice:
+    ,testphase / tagpdf .code:n =
+      {
+        \tl_gput_right:Nn\g__pdfmanagement_testphase_tl
+          {
+            \RequirePackage{tagpdf}
+            \AddToDocumentProperties [document]{testphase/tagpdf}{loaded}
+          }
+      }
+    ,testphase / headings .code:n =
+      {
+        \tl_gput_right:Nn\g__pdfmanagement_testphase_tl
+          {
+            \RequirePackage{headings-testphase}
+            \AddToDocumentProperties [document]{testphase/headings}{loaded}
+          }
+      }
+    ,testphase / ptagging .code:n =
+      {
+        \tl_gput_right:Nn\g__pdfmanagement_testphase_tl
+          {
+            \AddToHook{class/after}
+              {
+                \RequirePackage{ptagging-testphase}
+                \AddToDocumentProperties [document]{testphase/ptagging}{loaded}
+              }
+          }
+      }
+    ,testphase / unknown .code:n =
+      {
+        \tl_gput_right:Nn\g__pdfmanagement_testphase_tl
+           {
+             \AddToHook{class/after}
+               {
+                 \RequirePackage{#1-testphase}
+                 \AddToDocumentProperties [document]{testphase/#1}{loaded}
+               }
+           }
+      }
+    ,activate .multichoice:
+    ,activate / tagging .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{activate,paratagging,interwordspace}
+            \AddToDocumentProperties [document]{tagging}{active}
+            \AddToDocumentProperties [document]{tagging/para}{active}
+            \AddToDocumentProperties [document]{tagging/interwordspace}{active}
+          }
+      }
+    ,debug .code:n =
+      {
+        \keys_set:nn { document / metadata / debug } {#1}
+      }
+    ,debug / para .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{paratagging-show}
+          }
+      }
+    ,debug / log .code:n =
+      {
+        \AddToHook{package/after/tagpdf}
+          {
+            \tagpdfsetup{log=#1}
+          }
+      }
+    ,debug / uncompress .code:n =
+      {
+        \pdf_uncompress:
+      }
   }
 %% File: l3pdfannot.dtx
 \RequirePackage{l3bitset}

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/pdfmanagement-testphase.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -19,7 +19,7 @@
 %% and all files in that bundle must be distributed together.
 %% 
 %% File: pdfmanagement-testphase.dtx
-\ProvidesExplPackage{pdfmanagement-testphase}{2021-06-29}{0.95f}
+\ProvidesExplPackage{pdfmanagement-testphase}{2021-07-21}{0.95g}
   {LaTeX PDF management testphase bundle}
 \providecommand\IfFormatAtLeastTF{\@ifl at t@r\fmtversion}
 \IfFormatAtLeastTF{2020-10-01}{}{

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/transparent-ltx.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -3,7 +3,7 @@
 %% a replacement for transparent sty from Heiko Oberdiek
 %%
 \NeedsTeXFormat{LaTeX2e}[2020/10/01]
-\ProvidesExplPackage{transparent-ltx}{2021-06-29}{0.95f}
+\ProvidesExplPackage{transparent-ltx}{2021-07-21}{0.95g}
   {Transparency with color stacks (replacement for transparent.sty from Heiko Oberdiek)}%
 
 \RequirePackage{l3opacity}

Modified: trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty
===================================================================
--- trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty	2021-07-22 20:39:40 UTC (rev 60015)
+++ trunk/Master/texmf-dist/tex/latex/pdfmanagement-testphase/xcolor-patches-tmp-ltx.sty	2021-07-22 20:40:06 UTC (rev 60016)
@@ -1,6 +1,6 @@
 %% LaTeX2e file `xcolor-patches.sty'
 %%
-\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-06-29 v0.95f patch xcolor for l3color]
+\ProvidesPackage{xcolor-patches-tmp-ltx}[2021-07-21 v0.95g patch xcolor for l3color]
 \@ifundefined{color_set:nn}{\RequirePackage{l3color}}{}
 
 \ExplSyntaxOn
@@ -8,7 +8,7 @@
 % #2:  model or models
 % #3: value: either numbers or a color name
 % #4 is the type: named or ps
-\cs_gset_protected:Npn \@expl at xcolor@set@@nnnn #1 #2 #3 #4
+\cs_gset_protected:Npn \__pdfmanagement_firstaid_xcolor_set:nnnn #1 #2 #3 #4
     {
       \str_case:nnF {#4}
         {
@@ -40,12 +40,14 @@
            }
         }
     }
- \cs_generate_variant:Nn \color_set:nn {ne}
- \cs_new_protected:Npn \@expl at xcolor@set@@ne #1 #2
-    {
-      \exp_args:Nx \__color_if_defined:nT {#2}
-           { \color_set:ne {#1}{#2} }
-    }
+\cs_generate_variant:Nn \__pdfmanagement_firstaid_xcolor_set:nnnn {nonn}
+\cs_set_eq:NN \@expl at xcolor@set@@nonn \__pdfmanagement_firstaid_xcolor_set:nonn
+\cs_generate_variant:Nn \color_set:nn {ne}
+\cs_new_protected:Npn \@expl at xcolor@set@@ne #1 #2
+   {
+     \exp_args:Nx \__color_if_defined:nT {#2}
+       { \color_set:ne {#1}{#2} }
+   }
 \ExplSyntaxOff
 %\pretocmd{\XC at col@rlet}   {\@expl at color@set@@ne{#2}{#4}}{}{\fail}
 \def\XC at col@rlet[#1]#2[#3]#4%
@@ -76,7 +78,7 @@
 
 %\pretocmd{\XC at definec@lor}{\@expl at color@set@@nnn{#2}{#4}{#5}}{}{\fail}
 \def\XC at definec@lor[#1]#2[#3]#4#5%
- {\@expl at xcolor@set@@nnnn{#2}{#4}{#5}{#1}%
+ {\@expl at xcolor@set@@nonn{#2}{#4}{#5}{#1}%
   \begingroup
   \XC at sdef\@@cls{#1}\XC at edef\@@nam{#2}\edef\colornameprefix{#3}%
   \XC at logdef\@@nam



More information about the tex-live-commits mailing list.