[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: ensure that pdfproducer is set with hyperxmp (49553c4)
Ulrike Fischer
fischer at troubleshooting-tex.de
Mon Jul 25 23:19:08 CEST 2022
Repository : https://github.com/latex3/pdfresources
On branch : develop
Link : https://github.com/latex3/pdfresources/commit/49553c4db5b6d5ad4ad72769ff0b8b1a120bdffd
>---------------------------------------------------------------
commit 49553c4db5b6d5ad4ad72769ff0b8b1a120bdffd
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Mon Jul 25 23:19:08 2022 +0200
ensure that pdfproducer is set with hyperxmp
>---------------------------------------------------------------
49553c4db5b6d5ad4ad72769ff0b8b1a120bdffd
firstaid/hyperxmp-patches-tmp-ltx.sty | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/firstaid/hyperxmp-patches-tmp-ltx.sty b/firstaid/hyperxmp-patches-tmp-ltx.sty
index 623388b..8cd0913 100644
--- a/firstaid/hyperxmp-patches-tmp-ltx.sty
+++ b/firstaid/hyperxmp-patches-tmp-ltx.sty
@@ -153,6 +153,10 @@
{\AddToDocumentProperties[hyperref]{pdfauthor}{Title}}
}
+% hyperxmp recalculates pdfproduce at begin document and we should copy that definition
+\AddToHook{begindocument/end}
+ {\edef\next{\noexpand\AddToDocumentProperties[hyperref]{pdfproducer}{\@pdfproducer}}\next}
+
\DeclareHookRule{begindocument/before}{pdfmanagement/firstaid/hyperxmp}{before}{hyperxmp}
% hyperxmp puts the code into enddocument, but for xetex this is too late.
More information about the latex3-commits
mailing list.