File tree Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Expand file tree Collapse file tree 2 files changed +29
-3
lines changed Original file line number Diff line number Diff line change
1
+ 2025-06-17 Ulrike Fischer
2
+ * hyperref.dtx: set the pdfa key automatically if an A-standard is
3
+ set in \DocumentMetadata. issue #387
4
+
1
5
2025-06-01 Ulrike Fischer
2
6
* hyperref.dtx: change hyperindexformat to hyperxindexformat, issue #386
3
7
Original file line number Diff line number Diff line change 6502
6502
\define@key{Hyp}{pdfdisplaydoctitle}[true]{%
6503
6503
\Hy@boolkey{pdfdisplaydoctitle}{#1}%
6504
6504
}
6505
- \define@key{Hyp}{pdfa}[true]{%
6506
- \Hy@boolkey{pdfa}{#1}%
6505
+ \define@key{Hyp}{pdfa}[true]{%
6506
+ \IfDocumentMetadataTF
6507
+ {
6508
+ \PackageWarning{hyperref}{%
6509
+ \string\DocumentMetadata\space detected.\MessageBreak
6510
+ The 'pdfa' key will be ignored.\MessageBreak
6511
+ Please set the PDF/A standard in \string\DocumentMetadata\MessageBreak
6512
+ with the 'pdfstandard' key.}
6513
+ }
6514
+ {\Hy@boolkey{pdfa}{#1}}%
6507
6515
}
6516
+
6508
6517
\define@key{Hyp}{pdfnewwindow}[true]{%
6509
6518
\def\Hy@temp{#1}%
6510
6519
\ifx\Hy@temp\@empty
6833
6842
% \end{macrocode}
6834
6843
%
6835
6844
% \subsection{PDF/A}
6836
- %
6845
+ % If an A-standard has been set in \cs{DocumentMetadata} hyperref should set the pdfa
6846
+ % key too.
6837
6847
% \begin{macrocode}
6848
+ \ExplSyntaxOn
6849
+ \IfDocumentMetadataT
6850
+ {
6851
+ \tl_if_empty:eTF{\GetDocumentProperties{document/pdfstandard}}
6852
+ {
6853
+ \Hy@pdfafalse
6854
+ }
6855
+ {
6856
+ \Hy@pdfatrue
6857
+ }
6858
+ }
6859
+ \ExplSyntaxOff
6838
6860
\Hy@DisableOption{pdfa}
6839
6861
% \end{macrocode}
6840
6862
%
You can’t perform that action at this time.
0 commit comments