[latex3-commits] [latex3/pdfresources] develop: add test that colorprofile exists (947f69b)

github at latex-project.org github at latex-project.org
Sat Apr 6 17:10:44 CEST 2024


Repository : https://github.com/latex3/pdfresources
On branch  : develop
Link       : https://github.com/latex3/pdfresources/commit/947f69b71f5b9e06ee93e898f6504855933fde24

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

commit 947f69b71f5b9e06ee93e898f6504855933fde24
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date:   Sat Apr 6 17:10:44 2024 +0200

    add test that colorprofile exists


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

947f69b71f5b9e06ee93e898f6504855933fde24
 l3pdfmeta.dtx | 42 +++++++++++++++++++++++++++---------------
 1 file changed, 27 insertions(+), 15 deletions(-)

diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 459265b..b4eebc0 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -1187,14 +1187,20 @@
   {
     \pdfmeta_standard_verify:nTF {outputintent_A}
       {
-         \prop_map_inline:Nn \g_@@_outputintents_prop
-           {
-             \@@_embed_colorprofile:n
-               {#2}
-             \@@_write_outputintent:nn
-               {#2}
-               {#1}
+        \prop_if_exist:cTF {c_@@_colorprofile_#2}
+          {  
+            \prop_map_inline:Nn \g_@@_outputintents_prop
+              {
+                \@@_embed_colorprofile:n
+                 {#2}
+                \@@_write_outputintent:nn
+                 {#2}
+                 {#1}
+              }   
            }
+          {
+            \typeout{colorprofile~#2~unknown}
+          }  
       }
 %    \end{macrocode}
 % If an output intent is required for pdf/A we need to ensure, that the key of
@@ -1218,14 +1224,20 @@
            \g_@@_outputintents_prop
            { \pdfmeta_standard_item:n { outputintent_A } }
            \l_@@_tmpb_tl
-         \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl
-         \prop_map_inline:Nn \g_@@_outputintents_prop
-           {
-             \exp_args:NV
-             \@@_write_outputintent:nn
-               \l_@@_tmpb_tl
-               { #1 }
-           }
+         \prop_if_exist:cTF {c_@@_colorprofile_\l_@@_tmpb_tl}
+          {                  
+            \exp_args:NV \@@_embed_colorprofile:n \l_@@_tmpb_tl
+            \prop_map_inline:Nn \g_@@_outputintents_prop
+              {
+                \exp_args:NV
+                 \@@_write_outputintent:nn
+                   \l_@@_tmpb_tl
+                   { #1 }
+              }
+          }
+          {
+            \typeout{colorprofile~\l_@@_tmpb_tl\c_space_tl unknown}
+          }    
        }
    }
 %    \end{macrocode}





More information about the latex3-commits mailing list.