Skip to content

Commit 6609888

Browse files
committed
suppress pdfa key and message if DocumentMetadata is detected issue #387
1 parent c9210a6 commit 6609888

File tree

2 files changed

+20
-6
lines changed

2 files changed

+20
-6
lines changed

ChangeLog.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
2025-06-17 Ulrike Fischer
2+
* hyperref.dtx: suppress pdfa key and message if \DocumentMetadata is detected issue #387
3+
14
2025-06-01 Ulrike Fischer
25
* hyperref.dtx: change hyperindexformat to hyperxindexformat, issue #386
36

hyperref.dtx

Lines changed: 17 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6503,7 +6503,15 @@
65036503
\Hy@boolkey{pdfdisplaydoctitle}{#1}%
65046504
}
65056505
\define@key{Hyp}{pdfa}[true]{%
6506-
\Hy@boolkey{pdfa}{#1}%
6506+
\IfDocumentMetadataTF
6507+
{%
6508+
\PackageWarning{hyperref}{%
6509+
\string\DocumentMetadata\space detected. \MessageBreak
6510+
The 'pdfa' key will be ignored.\MessageBreak
6511+
Set the PDF standard in \string\DocumentMetadata.\MessageBreak
6512+
}
6513+
}
6514+
{\Hy@boolkey{pdfa}{#1}}%
65076515
}
65086516
\define@key{Hyp}{pdfnewwindow}[true]{%
65096517
\def\Hy@temp{#1}%
@@ -9353,11 +9361,14 @@
93539361
\else
93549362
\Hy@Info{Link coloring with OCG OFF}%
93559363
\fi
9356-
\ifHy@pdfa
9357-
\Hy@Info{PDF/A mode ON}%
9358-
\else
9359-
\Hy@Info{PDF/A mode OFF}%
9360-
\fi
9364+
\IfDocumentMetadataF
9365+
{%
9366+
\ifHy@pdfa
9367+
\Hy@Info{PDF/A mode ON}%
9368+
\else
9369+
\Hy@Info{PDF/A mode OFF}%
9370+
\fi
9371+
}
93619372
% \end{macrocode}
93629373
% \section{Low-level utility macros}
93639374
% We need unrestricted access to the |#|, |~| and |"| characters, so make

0 commit comments

Comments
 (0)