summaryrefslogtreecommitdiff
path: root/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
diff options
context:
space:
mode:
Diffstat (limited to 'macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx')
-rw-r--r--macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx90
1 files changed, 84 insertions, 6 deletions
diff --git a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
index a8f9fa8a24..459265b2cf 100644
--- a/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
+++ b/macros/latex/contrib/pdfmanagement-testphase/l3pdfmeta.dtx
@@ -49,7 +49,7 @@
% }^^A
% }
%
-% \date{Version 0.96f, released 2024-03-01}
+% \date{Version 0.96g, released 2024-03-26}
%
% \maketitle
% \begin{documentation}
@@ -552,7 +552,12 @@
% The keys |pdfcopyright| and |pdflicenseurl| work similar as in \pkg{hyperxmp}.
% But differently to \pkg{hyperxmp} the code doesn't set the |xmpRights:Marked|
% property, as I have some doubts that one deduce its value simply
-% by checking if the other keys have been used; if needed it should be added manually.
+% by checking if the other keys have been used; if needed it can be added by
+% using one of these settings (true means with copyright, false means public domain).
+% \begin{verbatim}
+% \AddToDocumentProperties[document]{copyright}{true}
+% \AddToDocumentProperties[document]{copyright}{false}
+% \end{verbatim}
%
% \subsection{PDF related data}
% The PDF producer is for all engines by default built from the engine
@@ -597,7 +602,9 @@
% and use the \texttt{e} variant to expand it.
% \end{function}
%
-% \begin{function}{\pdfmeta_xmp_add_declaration:nnnnn,\pdfmeta_xmp_add_declaration:ennnn}
+% \begin{function}{\pdfmeta_xmp_add_declaration:nnnnn,
+% \pdfmeta_xmp_add_declaration:ennnn,
+% \pdfmeta_xmp_add_declaration:eeenn}
% \begin{syntax}
% \cs{pdfmeta_xmp_add_declaration:nnnnn}\Arg{uri}\Arg{By}\Arg{Date}\Arg{Credentials}\Arg{Report}
% \end{syntax}
@@ -618,7 +625,7 @@
% \begin{macrocode}
%<@@=pdfmeta>
%<*header>
-\ProvidesExplPackage{l3pdfmeta}{2024-03-01}{0.96f}
+\ProvidesExplPackage{l3pdfmeta}{2024-03-26}{0.96g}
{PDF-Standards---LaTeX PDF management testphase bundle}
%</header>
% \end{macrocode}
@@ -1281,9 +1288,41 @@
\AddToDocumentProperties [document]{pdfstandard-UA}{{2}{2024}}
\AddToHook{begindocument/before}
{\prop_gput:Nnn \g__pdfmeta_standard_prop {Trailer_no_Info}{}}
+ \AddToHook{begindocument/before}
+ {
+ \@@_xmp_wtpdf_accessibility_declaration:
+ \@@_xmp_wtpdf_reuse_declaration:
+ }
},
- xmp .bool_gset:N = \g_@@_xmp_bool
+ xmp .choice:,
+ xmp / true .code:n = { \bool_gset_true:N \g_@@_xmp_bool },
+ xmp / false .code:n = { \bool_gset_false:N \g_@@_xmp_bool},
+ xmp .default:n = true,
+% \end{macrocode}
+% These keys allow to disable or force the wtpdf declarations.
+% Currently the content can not be changed and once they have been disabled there
+% are gone. This will perhaps change.
+% \begin{macrocode}
+ xmp / wtpdf .code:n =
+ {
+ \keys_set:nn {@@/xmp}{#1}
+ },
}
+\keys_define:nn {@@/xmp}
+ {
+ reuse .choice:,
+ reuse / true .code:n = \@@_xmp_wtpdf_reuse_declaration:,
+ reuse / false .code:n =
+ {
+ \cs_set_eq:NN \@@_xmp_wtpdf_reuse_declaration: \prg_do_nothing:
+ },
+ accessibility .choice:,
+ accessibility / true .code:n = \@@_xmp_wtpdf_accessibility_declaration:,
+ accessibility /false .code:n =
+ {
+ \cs_set_eq:NN \@@_xmp_wtpdf_accessibility_declaration: \prg_do_nothing:
+ },
+ }
% \end{macrocode}
% XMP debugging option
% \begin{macrocode}
@@ -2616,6 +2655,16 @@
{xmpRights}
{WebStatement}
{\GetDocumentProperties{hyperref/pdflicenseurl}}
+ \@@_xmp_add_packet_line:nne
+ {xmpRights}
+ {Marked}
+ {
+ \str_case:en {\GetDocumentProperties{document/copyright}}
+ {
+ {true}{True}
+ {false}{False}
+ }
+ }
}
% \end{macrocode}
% \end{macro}
@@ -2869,7 +2918,36 @@
\l_@@_tmpa_tl
}
}
-\cs_generate_variant:Nn\pdfmeta_xmp_add_declaration:nnnnn {e}
+\cs_generate_variant:Nn\pdfmeta_xmp_add_declaration:nnnnn {e,eee}
+% \end{macrocode}
+% \end{macro}
+%
+% \subsection{Default declarations}
+% The two declarations will be required quite often with ua-2, so we
+% provide some interface.
+
+% \begin{macro}{\@@_xmp_wtpdf_reuse_declaration:,\@@_xmp_wtpdf_accessibility_declaration:}
+% \begin{macrocode}
+\cs_new:Npn \@@_xmp_iso_today:
+ {
+ \int_use:N\c_sys_year_int-
+ \int_compare:nNnT {\c_sys_month_int} < {10}{0} \int_use:N\c_sys_month_int -
+ \int_compare:nNnT {\c_sys_day_int} < {10}{0} \int_use:N\c_sys_day_int
+ }
+\cs_new_protected:Npn \@@_xmp_wtpdf_reuse_declaration:
+ {
+ \pdfmeta_xmp_add_declaration:eeenn
+ {http://pdfa.org/declarations\c_hash_str wtpdf-reuse1.0}
+ {LaTeX~Project}
+ {\@@_xmp_iso_today:}{}{}
+ }
+\cs_new_protected:Npn \@@_xmp_wtpdf_accessibility_declaration:
+ {
+ \pdfmeta_xmp_add_declaration:ennnn
+ {http://pdfa.org/declarations\c_hash_str wtpdf-accessibility1.0}
+ {LaTeX~Project}
+ {\@@_xmp_iso_today:}{}{}
+ }
% \end{macrocode}
% \end{macro}
%