[latex3-commits] [git/LaTeX3-latex3-pdfresources] textfields: change annot dict (15803b7)

Ulrike Fischer fischer at troubleshooting-tex.de
Wed May 5 18:48:09 CEST 2021


Repository : https://github.com/latex3/pdfresources
On branch  : textfields
Link       : https://github.com/latex3/pdfresources/commit/15803b7f7722201d02e756ed4fcd0d1178bfcb8b

>---------------------------------------------------------------

commit 15803b7f7722201d02e756ed4fcd0d1178bfcb8b
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Wed May 5 18:48:09 2021 +0200

    change annot dict


>---------------------------------------------------------------

15803b7f7722201d02e756ed4fcd0d1178bfcb8b
 l3pdffield.dtx | 19 ++++++++++++-------
 1 file changed, 12 insertions(+), 7 deletions(-)

diff --git a/l3pdffield.dtx b/l3pdffield.dtx
index 82f0b71..d990d7a 100644
--- a/l3pdffield.dtx
+++ b/l3pdffield.dtx
@@ -739,6 +739,7 @@
 \cs_set_eq:NN \pdffield_field:nn \@@_field:nn
 %    \end{macrocode}
 % \end{macro}
+%
 % \subsection{The annot dictionary}
 % We assume that the annotation should really occupy space on the page and
 % leave vertical mode.
@@ -747,10 +748,11 @@
 % We use a local dictionary which is copied into |l__pdfannot/widget| in the code.
 % We define a dictionary for the AP content, so that we can add R and D too
 %    \begin{macrocode}
-\pdfdict_new:n   {l_@@/annot}
-\pdfdict_put:nnn {l_@@/annot}{Subtype}{/Widget}
+%\pdfdict_new:n   {l_@@/annot}
+%\pdfdict_put:nnn {l_@@/annot}{Subtype}{/Widget}
 \pdfdict_new:n   {l_@@/annot/AA}
 \pdfdict_new:n   {l_@@/annot/AP}
+\pdfdict_new:n   {l_@@/annot/MK}
 %    \end{macrocode}
 %
 % \begin{macro}{\@@_annot:n}
@@ -760,7 +762,8 @@
     \group_begin:
     \keys_set:nn {pdffield / annot } {#1}  %preset something? dimensions?
     \pdf_object_unnamed_write:nx {dict}{\pdfdict_use:n{l_@@/annot/AP}}
-    \pdfdict_put:nnx {l_@@/annot}{AP}{\pdf_object_ref_last:}
+    %\pdfdict_put:nnx {l_@@/annot}{AP}{\pdf_object_ref_last:}
+    \pdfannot_dict_put:nnx {widget}{AP}{\pdf_object_ref_last:}
     \pdfmeta_standard_verify:nF
       {annot_flags}
       {
@@ -769,15 +772,17 @@
         \bitset_set_false:Nn \l_@@_F_bitset {Invisible}
         \bitset_set_false:Nn \l_@@_F_bitset {NoView}
       }
-    \pdfdict_put:nnx {l_@@/annot}{F}{ \bitset_to_arabic:N \l_@@_F_bitset }
+    %\pdfdict_put:nnx {l_@@/annot}{F}{ \bitset_to_arabic:N \l_@@_F_bitset }
+    \pdfannot_dict_put:nnx {widget}{F}{ \bitset_to_arabic:N \l_@@_F_bitset }
     \pdfdict_if_empty:nF{l_@@/annot/AA}
       {
         \pdfmeta_standard_verify:nT
          {annot_widget_no_AA}
          {
            \pdf_object_unnamed_write:nx {dict}{\pdfdict_use:n{l_@@/annot/AA}}
-           \pdfdict_put:nnx
-             {l_@@/annot}
+           %\pdfdict_put:nnx
+           %  {l_@@/annot}
+           \pdfannot_dict_put:nnx {widget}
              {AA}
              {\pdf_object_ref_last:}
          }
@@ -787,7 +792,7 @@
 % perhaps need a function in l3pdfannot,
 % as it actually uses an internal name of another module.
 %    \begin{macrocode}
-    \pdfdict_set_eq:nn {l__pdfannot/widget}{l_@@/annot}
+    %\pdfdict_set_eq:nn {l__pdfannot/widget}{l_@@/annot}
     \mode_leave_vertical:
     \hbox_to_wd:nn
       { \l_@@_annot_wd_dim  }





More information about the latex3-commits mailing list.