[latex3-commits] [latex3/pdfresources] gh72-expand-pdfauthor: add warnings if pdfversion does not fit ua-1 or ua-2 (04cd0adf)

github at latex-project.org github at latex-project.org
Tue Jul 9 09:59:16 CEST 2024


Repository : https://github.com/latex3/pdfresources
On branch  : gh72-expand-pdfauthor
Link       : https://github.com/latex3/pdfresources/commit/04cd0adfa4df4bc31f6357533cc1404c2c6ae912

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

commit 04cd0adfa4df4bc31f6357533cc1404c2c6ae912
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Tue Jul 9 09:59:16 2024 +0200

    add warnings if pdfversion does not fit ua-1 or ua-2


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

04cd0adfa4df4bc31f6357533cc1404c2c6ae912
 CHANGELOG.md  |  1 +
 l3pdfmeta.dtx | 15 +++++++++++++++
 2 files changed, 16 insertions(+)

diff --git a/CHANGELOG.md b/CHANGELOG.md
index bf9a4bac..b7a53510 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -10,6 +10,7 @@ this project uses date-based 'snapshot' version identifiers.
 ### Added
 
  - added a verification 'omit_CID' used by PDF/a-2 and newer with luatex.
+ - warnings if pdfversion does not fit ua-1 and ua-2
 
 ## [2024-05-23]
 Version: 2024-05-23, 0.96i
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 148bcffc..b5857933 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -1338,6 +1338,15 @@
    _pdfstandard / UA-1 .code:n =
     {
      \AddToDocumentProperties [document]{pdfstandard-UA}{{1}{}}
+     \AddToHook{begindocument/before}
+       {
+         \pdf_version_compare:NnF < {2.0}
+           {
+             \msg_warning:nneee 
+              {pdf}{wrong-pdfversion}
+              {\pdf_version:}{high}{UA-1}                  
+           }  
+       }          
     },
 %    \end{macrocode}
 % currently it is not possible to merge requirements - these need some thoughts as
@@ -1353,6 +1362,12 @@
        {
          \@@_xmp_wtpdf_accessibility_declaration:
          \@@_xmp_wtpdf_reuse_declaration:
+         \pdf_version_compare:NnT < {2.0}
+           {
+             \msg_warning:nneee 
+              {pdf}{wrong-pdfversion}
+              {\pdf_version:}{low}{UA-2}                  
+           }  
        }        
     },    
    xmp  .choice:,





More information about the latex3-commits mailing list.