[latex3-commits] [git/LaTeX3-latex3-pdfresources] textfields: correct object names (67489c1)

Ulrike Fischer fischer at troubleshooting-tex.de
Sun May 2 23:52:34 CEST 2021


Repository : https://github.com/latex3/pdfresources
On branch  : textfields
Link       : https://github.com/latex3/pdfresources/commit/67489c1f079f402f7294f1b1f2b493033e851db5

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

commit 67489c1f079f402f7294f1b1f2b493033e851db5
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sun May 2 23:52:34 2021 +0200

    correct object names


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

67489c1f079f402f7294f1b1f2b493033e851db5
 l3backend-testphase.dtx    | 44 ++++++++++++++++++++++----------------------
 l3pdffile.dtx              |  7 ++++---
 l3pdftools.dtx             |  6 +++---
 pdfmanagement-firstaid.dtx |  6 +++---
 4 files changed, 32 insertions(+), 31 deletions(-)

diff --git a/l3backend-testphase.dtx b/l3backend-testphase.dtx
index 1b1e1b1..fd0e303 100644
--- a/l3backend-testphase.dtx
+++ b/l3backend-testphase.dtx
@@ -590,14 +590,14 @@
  %create the backend objects:
 \clist_map_inline:Nn \c_@@_backend_PageResources_clist
   {
-    \@@_backend_object_new:nn {Page/Resources/#1} {dict}
+    \@@_backend_object_new:nn {@@/Page/Resources/#1} {dict}
     \cs_if_exist:NT \tex_directlua:D
       {
         \tex_directlua:D
           {
-            ltx.@@.object["Page/Resources/#1"]
+            ltx.@@.object["@@/Page/Resources/#1"]
             =
-            "\@@_backend_object_ref:n{Page/Resources/#1}"
+            "\@@_backend_object_ref:n{@@/Page/Resources/#1}"
           }
       }
    }
@@ -631,7 +631,7 @@
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/##1} }
           {
             \@@_backend_object_write:nx
-              { Page/Resources/##1 }
+              { @@/Page/Resources/##1 }
               { \pdfdict_use:n { g_@@_Core/Page/Resources/##1} }
           }
      }
@@ -651,8 +651,8 @@
 %
 \clist_map_inline:Nn \c_@@_backend_PageResources_clist
   {
-    \@@_backend_object_new:nn   { Page/Resources/#1 } { dict }
-    \hook_gput_code:nnn{shipout/firstpage}{pdf}{\@@_backend_object_write:nn { Page/Resources/#1 } {}}
+    \@@_backend_object_new:nn   { @@/Page/Resources/#1 } { dict }
+    \hook_gput_code:nnn{shipout/firstpage}{pdf}{\@@_backend_object_write:nn { @@/Page/Resources/#1 } {}}
   }
 \cs_new_protected:Npn \@@_backend_PageResources:n #1
   {
@@ -667,7 +667,7 @@
    %objects are not filled with \pdf_object_write as this is not additive!
     \@@_backend:x
       {
-        put~\@@_backend_object_ref:n {Page/Resources/#1}<</#2~#3>>
+        put~\@@_backend_object_ref:n {@@/Page/Resources/#1}<</#2~#3>>
       }
   }
 
@@ -847,7 +847,7 @@
             \__kernel_backend_literal:x
               {
                 pdf:put~@resources~
-                  <</##1~\@@_backend_object_ref:n {Page/Resources/##1}>>
+                  <</##1~\@@_backend_object_ref:n {@@/Page/Resources/##1}>>
               }
           }
       }
@@ -1042,7 +1042,7 @@
     \prop_if_empty:cF
       { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/#1} }
       {
-        \pdfdict_item:ne { #1 }{ \pdf_object_ref:n {Page/Resources/#1}}
+        \pdfdict_item:ne { #1 }{ \pdf_object_ref:n {@@/Page/Resources/#1}}
       }
   }
 
@@ -1243,22 +1243,22 @@
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/ExtGState } }
           {
-            /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+            /ExtGState~ \pdf_object_ref:n { @@/Page/Resources/ExtGState }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/Pattern } }
           {
-            /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+            /Pattern~ \pdf_object_ref:n { @@/Page/Resources/Pattern }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/Shading } }
           {
-            /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+            /Shading~ \pdf_object_ref:n { @@/Page/Resources/Shading }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/ColorSpace } }
           {
-            /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
+            /ColorSpace~ \pdf_object_ref:n { @@/Page/Resources/ColorSpace }
           }
       }
       \l_@@_backend_tmpa_box
@@ -1323,22 +1323,22 @@
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/ExtGState } }
           {
-            /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+            /ExtGState~ \pdf_object_ref:n { @@/Page/Resources/ExtGState }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/Pattern } }
           {
-            /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+            /Pattern~ \pdf_object_ref:n { @@/Page/Resources/Pattern }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/Shading } }
           {
-            /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+            /Shading~ \pdf_object_ref:n { @@/Page/Resources/Shading }
           }
         \prop_if_empty:cF
           { \__kernel_pdfdict_name:n { g_@@_Core/Page/Resources/ColorSpace } }
           {
-            /ColorSpace~ \pdf_object_ref:n { Page/Resources/ColorSpace }
+            /ColorSpace~ \pdf_object_ref:n { @@/Page/Resources/ColorSpace }
           }
       }
       \l_@@_backend_tmpa_box
@@ -1414,21 +1414,21 @@
                {
                  put~ @resources ~
                    <<
-                     /ExtGState~ \pdf_object_ref:n { Page/Resources/ExtGState }
+                     /ExtGState~ \pdf_object_ref:n { @@/Page/Resources/ExtGState }
                    >>
                }
              \@@_backend:x
                {
                  put~ @resources ~
                  <<
-                   /Pattern~ \pdf_object_ref:n { Page/Resources/Pattern }
+                   /Pattern~ \pdf_object_ref:n { @@/Page/Resources/Pattern }
                  >>
                }
              \@@_backend:x
                {
                  put~ @resources ~
                  <<
-                   /Shading~ \pdf_object_ref:n { Page/Resources/Shading }
+                   /Shading~ \pdf_object_ref:n { @@/Page/Resources/Shading }
                  >>
                }
              \@@_backend:x
@@ -1436,7 +1436,7 @@
                  put~ @resources ~
                  <<
                    /ColorSpace~
-                   \pdf_object_ref:n { Page/Resources/ColorSpace }
+                   \pdf_object_ref:n { @@/Page/Resources/ColorSpace }
                  >>
                }
              \exp_args:Nx
@@ -1582,7 +1582,7 @@ local function @@_backend_PageResources_gpush (page)
  end
   for i,name in ipairs(ResourceList) do
    if ltx.@@.Page.Resources[name] then
-   token = token .. "/"..name.." "..ltx.pdf.object_ref("Page/Resources/".name)
+   token = token .. "/"..name.." "..ltx.pdf.object_ref("@@/Page/Resources/"..name)
    end
   end
  return token
diff --git a/l3pdffile.dtx b/l3pdffile.dtx
index 7809732..3b947da 100644
--- a/l3pdffile.dtx
+++ b/l3pdffile.dtx
@@ -262,7 +262,8 @@
 %   \end{syntax}
 %   This commands embeds the file \meta{source filename} in the PDF,
 %   and creates a |/Filespec| dictionary object named \meta{object name}.
-%   The object name must be unique.
+%   The object name must be unique, it should start with the module name, so
+%   e.g. \texttt{module/name}.
 %   The command uses the content of the local
 %   dictionaries |l_pdffile|, |l_pdffile/Params| and |l_pdffile/Filespec|
 %   to setup the dictionary entries of the stream object and the
@@ -360,12 +361,12 @@
 %    \l_tmpa_str
 % \pdfdict_put:nnx  {l_pdffile/Filespec} {Desc}{\l_tmpa_str}
 % %embeds testinput.txt and calls it grüße.txt
-% \pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{file:example1}
+% \pdffile_embed_file:nnn {testinput.txt}{grüße.txt}{mymodule/example1}
 % %reference it in the panel
 % \pdfmanagement_add:nnx
 %  {Catalog/Names}
 %  {EmbeddedFiles}
-%   {\pdf_object_ref:n{file:example1}}
+%   {\pdf_object_ref:n{mymodule/example1}}
 % \group_end:
 % \end{verbatim}
 % \end{documentation}
diff --git a/l3pdftools.dtx b/l3pdftools.dtx
index 60d60d1..894df30 100644
--- a/l3pdftools.dtx
+++ b/l3pdftools.dtx
@@ -198,9 +198,9 @@
 %    It should be on the same page as the bdc-command.
 %
 %   \begin{verbatim}
-%   \pdf_object_new:nn   {objA}{dict}
-%   \pdf_object_write:nn {objA}{/Type/Artifact}
-%   \pdf_bdc:nn {Span}{objA}
+%   \pdf_object_new:nn   {module/objA}{dict}
+%   \pdf_object_write:nn {module/objA}{/Type/Artifact}
+%   \pdf_bdc:nn {Span}{module/objA}
 %   text
 %   \pdf_emc:
 %   \end{verbatim}
diff --git a/pdfmanagement-firstaid.dtx b/pdfmanagement-firstaid.dtx
index e27fa23..2a737ec 100644
--- a/pdfmanagement-firstaid.dtx
+++ b/pdfmanagement-firstaid.dtx
@@ -192,9 +192,9 @@
    %objects are already created ...
     \def\pgf at sys@pdf at possible@resources
       {
-        /ColorSpace~\pdf_object_ref:n {Page/Resources/ColorSpace}
-        /Pattern   ~\pdf_object_ref:n {Page/Resources/Pattern}
-        /ExtGState ~\pdf_object_ref:n {Page/Resources/ExtGState}
+        /ColorSpace~\pdf_object_ref:n {@@/Page/Resources/ColorSpace}
+        /Pattern   ~\pdf_object_ref:n {@@/Page/Resources/Pattern}
+        /ExtGState ~\pdf_object_ref:n {@@/Page/Resources/ExtGState}
       }
     \let\pgf at sys@pdf at check@resources=\relax%
     %not sure if needed, but perhaps the lists are used somewhere else ...





More information about the latex3-commits mailing list.