[latex3-commits] [latex3/pdfresources] develop: support for pdf/UA-2 (80c05da)

github at latex-project.org github at latex-project.org
Fri May 26 16:10:46 CEST 2023


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/80c05da5cad603762e4f8192ddb5a63b808fc4f2

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

commit 80c05da5cad603762e4f8192ddb5a63b808fc4f2
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Fri May 26 16:10:46 2023 +0200

    support for pdf/UA-2


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

80c05da5cad603762e4f8192ddb5a63b808fc4f2
 CHANGELOG.md  |  5 +++++
 l3pdfmeta.dtx | 24 ++++++++++++++++++++----
 ltdocinit.dtx |  5 +++--
 3 files changed, 28 insertions(+), 6 deletions(-)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index 56f51f6..3d003ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -5,6 +5,11 @@ first release 0.95a, 2021-02-23 will be documented in this file.
 The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
 this project uses date-based 'snapshot' version identifiers.
 
+## [Unreleased]
+
+### Added 
+ - key for the (not yet released) standard pdf/UA-2
+ 
 ## [2023-03-09]
 
 ### Fixed
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 034cf6f..cbde461 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -1213,7 +1213,11 @@
    _pdfstandard / X-6p .code:n =
     {\AddToDocumentProperties [document]{pdfstandard-X}{PDF/X-6p}},
    _pdfstandard / UA-1 .code:n =
-    {\AddToDocumentProperties [document]{pdfstandard-UA}{1}},
+    {
+     \AddToDocumentProperties [document]{pdfstandard-UA}{{1}{2016}}
+    },
+   _pdfstandard / UA-2 .code:n =
+    {\AddToDocumentProperties [document]{pdfstandard-UA}{{2}{2023}}},    
    xmp  .bool_gset:N = \g_@@_xmp_bool
  }
 %    \end{macrocode}
@@ -1930,7 +1934,8 @@
    {Year~of~standard}
 %    \end{macrocode}
 % \end{macro}
-%  \item[pdfuaid] here we need to declare the property \enquote{part}.
+%  \item[pdfuaid] here we need (?) to declare the property 
+%  \enquote{part} and \enquote{rev}.
 % \begin{macro}{pdfuaid~(schema)}
 %    \begin{macrocode}
 \@@_xmp_schema_new:nnn
@@ -1943,6 +1948,12 @@
    {Integer}
    {internal}
    {Part~of~ISO~14289~standard}
+\@@_xmp_property_new:nnnnn
+   {pdfuaid}
+   {rev}
+   {Integer}
+   {internal}
+   {Revision~of~ISO~14289~standard}   
 %    \end{macrocode}
 % \end{macro}
 % \item[pdfx] According to [1] not an allowed schema, but it seems
@@ -2216,8 +2227,13 @@
      {\@@_xmp_add_packet_line:nne {pdfaid}{rev}  {\pdfmeta_standard_item:n{year}}}
     \@@_xmp_add_packet_line:nne
       {pdfxid}{GTS_PDFXVersion}{\GetDocumentProperties{document/pdfstandard-X}}
-    \@@_xmp_add_packet_line:nne
-      {pdfuaid}{part}{\GetDocumentProperties{document/pdfstandard-UA}}
+    \pdfmanagement_get_documentproperties:nNT {document/pdfstandard-UA}\l_@@_tmpa_tl  
+     { 
+       \@@_xmp_add_packet_line:nne
+        {pdfuaid}{part}{\exp_last_unbraced:No\use_i:nn \l_@@_tmpa_tl}          
+      \@@_xmp_add_packet_line:nne
+        {pdfuaid}{rev}{\exp_last_unbraced:No\use_ii:nn \l_@@_tmpa_tl}            
+     } 
   }
 %    \end{macrocode}
 % \end{macro}
diff --git a/ltdocinit.dtx b/ltdocinit.dtx
index ba3473c..a446580 100644
--- a/ltdocinit.dtx
+++ b/ltdocinit.dtx
@@ -89,9 +89,10 @@
 %    \item[\texttt{pdfstandard}] Choice key to set the pdf standard.
 %    
 %      Starting with version 0.95s it is also possible to use the values
-%      |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1| for
+%      |X-4|, |X-4p|, |X-5g|, |X-5n|, |X-5pg|, |X-6|, |X-6n|, |X-6p|, |UA-1|, |UA-2| for
 %      a PDF/X and PDF/UA standard. These keys set \emph{only} the relevant
-%      XMP-metadata.
+%      XMP-metadata. Note that |UA-2| hasn't been released yet and should be used only together
+%      with pdf version 2.0.
 %      
 %      Beside this |A-1b|, |A-2a|, |A-2b|, |A-2u|, |A-3a|, |A-3b|, |A-3u| and |A-4|
 %      are accepted as values for A-standards. The casing is irrelevant, |a-1b| works too.





More information about the latex3-commits mailing list.