[latex3-commits] [git/LaTeX3-latex3-pdfresources] develop: support for pdf a-2u and a-3u, fix #17 (913ac3e)
Ulrike Fischer
fischer at troubleshooting-tex.de
Sun Jun 13 22:32:57 CEST 2021
Repository : https://github.com/latex3/pdfresources
On branch : develop
Link : https://github.com/latex3/pdfresources/commit/913ac3ee789583c49524acd4e11e71e039af3b41
>---------------------------------------------------------------
commit 913ac3ee789583c49524acd4e11e71e039af3b41
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Sun Jun 13 22:32:57 2021 +0200
support for pdf a-2u and a-3u, fix #17
>---------------------------------------------------------------
913ac3ee789583c49524acd4e11e71e039af3b41
hyperref-generic.dtx | 10 +++++++
l3pdfmeta.dtx | 39 +++++++++++++++++++++++--
ltdocinit.dtx | 13 +++++----
testfiles/{colorprofile1.pvt => u-standard.lvt} | 10 +++----
testfiles/u-standard.tlg | 0
5 files changed, 59 insertions(+), 13 deletions(-)
diff --git a/hyperref-generic.dtx b/hyperref-generic.dtx
index b635648..c222b5a 100644
--- a/hyperref-generic.dtx
+++ b/hyperref-generic.dtx
@@ -3962,6 +3962,16 @@
#1 .code:n= { \@@_store_metadata:nn {#1}{##1}}
}
}
+
+\str_if_eq:eeT {A}{\pdfmeta_standard_item:n{type}}
+ {
+ \exp_args:Nnx
+ \keys_set:nn {hyp / setup}
+ {
+ ,pdfapart = \pdfmeta_standard_item:n {level}
+ ,pdfaconformance = \pdfmeta_standard_item:n {conformance}
+ }
+ }
% \end{macrocode}
%
% \subsection{Transitions}
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index 44ea8a9..2cbe817 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -220,6 +220,9 @@
% this will e.g. be checked by the new hyperref driver.
% \item[|annot_widget_no_A_AA|] (rule 6.9-2) no A and AA dictionary in widget.
% \item[|form_no_AA|] (6.9-3) no /AA dictionary in form field
+% \item[|unicode|] that is set in the U-standards, A-2u and A-3u and means that
+% every text should be in unicode. This is not something that can be enforced or
+% tested from TeX, but in a current LaTeX normally ToUnicode are set for all fonts.
% \end{description}
%
% \subsubsection{Tests with values and special handlers}
@@ -513,7 +516,9 @@
% \begin{variable}{
% \g_@@_standard_pdf/A-1B_prop ,
% \g_@@_standard_pdf/A-2B_prop ,
-% \g_@@_standard_pdf/A-3B_prop
+% \g_@@_standard_pdf/A-2U_prop ,
+% \g_@@_standard_pdf/A-3B_prop ,
+% \g_@@_standard_pdf/A-3U_prop ,
% }
% \begin{macrocode}
\prop_new:c { g_@@_standard_pdf/A-1B_prop }
@@ -521,6 +526,8 @@
{
,name = pdf/A-1B
,type = A
+ ,level = 1
+ ,conformance = B
,year = 2005
,min_pdf_version = 1.4 %minimum
,no_encryption =
@@ -580,11 +587,25 @@
{ g_@@_standard_pdf/A-2B_prop }{name}{pdf/A-2B}
\prop_gput:cnn
{ g_@@_standard_pdf/A-2B_prop }{year}{2011}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-2B_prop }{level}{2}
% embedding files is allowed (with restrictions)
\prop_gremove:cn
{ g_@@_standard_pdf/A-2B_prop }
{ embed_content}
+%A-2u ==============
+\prop_new:c { g_@@_standard_pdf/A-2U_prop }
+\prop_gset_eq:cc
+ { g_@@_standard_pdf/A-2U_prop }
+ { g_@@_standard_pdf/A-2B_prop }
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-2U_prop }{name}{pdf/A-2U}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-2U_prop }{conformance}{U}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-2U_prop }{unicode}{}
+
%A-3b ==============
\prop_new:c { g_@@_standard_pdf/A-3B_prop }
\prop_gset_eq:cc
@@ -593,11 +614,25 @@
\prop_gput:cnn
{ g_@@_standard_pdf/A-3B_prop }{name}{pdf/A-3B}
\prop_gput:cnn
- { g_@@_standard_pdf/A-2B_prop }{year}{2012}
+ { g_@@_standard_pdf/A-3B_prop }{year}{2012}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-3B_prop }{level}{3}
% embedding files is allowed (with restrictions)
\prop_gremove:cn
{ g_@@_standard_pdf/A-3B_prop }
{ embed_content}
+
+%A-3u ==============
+\prop_new:c { g_@@_standard_pdf/A-3U_prop }
+\prop_gset_eq:cc
+ { g_@@_standard_pdf/A-3U_prop }
+ { g_@@_standard_pdf/A-3B_prop }
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-3U_prop }{name}{pdf/A-3U}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-3U_prop }{conformance}{U}
+\prop_gput:cnn
+ { g_@@_standard_pdf/A-3U_prop }{unicode}{}
% \end{macrocode}
% \end{variable}
%
diff --git a/ltdocinit.dtx b/ltdocinit.dtx
index 4d6974e..dbc7947 100644
--- a/ltdocinit.dtx
+++ b/ltdocinit.dtx
@@ -103,10 +103,13 @@
% \item[\texttt{lang}] to set the Lang entry in the Catalog.
% E.g. \texttt{lang=de-DE}. The initial value is |en-US|
% \item[\texttt{pdfstandard}] Choice key to set the pdf standard.
-% Currently |A-1b|, |A-2b| and |A-3b| are accepted as
-% values. The underlying code to ensure the requirements (as far as they
+% Currently |A-1b|, |A-2b|, |A-2u|, |A-3b| and |A-3u| are accepted as
+% values. The casing is irrelevant, |a-1b| works too.
+% The underlying code to ensure the requirements (as far as they
% can be ensured) is incomplete, but a color profile is included and the
-% /OutputIntent is set. More information can be found in the documentation
+% /OutputIntent is set. The |u| variants for example do not force unicode,
+% but they will pass the information to hyperref and hyperxmp.
+% More information can be found in the documentation
% of \pkg{l3pdfmeta}.
% \item[\texttt{colorprofiles}] This allows to load icc-colorprofiles. Details
% are described in the documentation of \pkg{l3pdfmeta}.
@@ -138,7 +141,7 @@
%
% \begin{function}{\GetDocumentProperties}
% \begin{syntax}
-% \cs{AddToDocumentProperties}\Arg{label/property}
+% \cs{GetDocumentProperties}\Arg{label/property}
% \end{syntax}
% Expands to the \meta{value} corresponding to \meta{label/property}
% in the container. If \meta{label/property} is missing,
@@ -329,7 +332,7 @@
\keys_set:nn {document / metadata} {_pdfstandard=\str_uppercase:n{#1}}
}
,_pdfstandard .choices:nn =
- {A-1B,A-2B,A-3B}
+ {A-1B,A-2B,A-2U,A-3B,A-3U}
{
\prop_if_exist:cT { g__pdfmeta_standard_pdf/#1_prop }
{
diff --git a/testfiles/colorprofile1.pvt b/testfiles/u-standard.lvt
similarity index 69%
copy from testfiles/colorprofile1.pvt
copy to testfiles/u-standard.lvt
index 065d5ae..1c3d44f 100644
--- a/testfiles/colorprofile1.pvt
+++ b/testfiles/u-standard.lvt
@@ -1,16 +1,14 @@
\PassOptionsToPackage{enable-debug,check-declarations}{expl3}
\RequirePackage{pdfmanagement-testphase}
-
\DeclareDocumentMetadata
{
- colorprofiles=
- {
- X=sRGB.icc,
- A=FOGRA39L_coated.icc
- },
+ pdfstandard=A-2u
}
\RequirePackage{pdfmanagement-regressiontest}
\documentclass{article}
+\usepackage{hyperref}
\begin{document}
xxyyzzww
+\Start
+\ShowDocumentProperties
\end{document}
\ No newline at end of file
diff --git a/testfiles/u-standard.tlg b/testfiles/u-standard.tlg
new file mode 100644
index 0000000..e69de29
More information about the latex3-commits
mailing list.