[latex3-commits] [git/LaTeX3-latex3-pdfresources] testA4: document suppressing of info dictionary (9f6861b)
Ulrike Fischer
fischer at troubleshooting-tex.de
Thu May 5 16:27:33 CEST 2022
Repository : https://github.com/latex3/pdfresources
On branch : testA4
Link : https://github.com/latex3/pdfresources/commit/9f6861b4b0e373a8914bf06301327641723da196
>---------------------------------------------------------------
commit 9f6861b4b0e373a8914bf06301327641723da196
Author: Ulrike Fischer <fischer at troubleshooting-tex.de>
Date: Thu May 5 16:27:33 2022 +0200
document suppressing of info dictionary
>---------------------------------------------------------------
9f6861b4b0e373a8914bf06301327641723da196
info/clearinfo.tex | 26 ++++++++++++++++++++++++++
l3pdfmeta.dtx | 11 +++++++++++
2 files changed, 37 insertions(+)
diff --git a/info/clearinfo.tex b/info/clearinfo.tex
new file mode 100644
index 0000000..1330ffc
--- /dev/null
+++ b/info/clearinfo.tex
@@ -0,0 +1,26 @@
+The following more or less clears the info dictionary.
+
+\pdfmanagement_add:nnn{Info}{Creator}{null}
+\pdfmanagement_add:nnn{Info}{Producer}{null}
+\pdfmanagement_add:nnn{Info}{CreationDate}{null}
+\pdfmanagement_add:nnn{Info}{Title}{null}
+\pdfmanagement_add:nnn{Info}{Trapped}{null}
+\pdfmanagement_add:nnn{Info}{ModDate}{null}
+
+\tex_pdfsuppressptexinfo:D 7 \scan_stop: %pdftex
+\tex_pdfvariable:D suppressoptionalinfo 7\relax %luatex
+
+if ModDate should stay
+
+\pdf_object_unnamed_write:nn{dict}{}
+\pdfmanagement_add:nnx{Catalog}{PieceInfo}{\pdf_object_ref_last:}
+
+
+Comments
+
+- verapdf doesn't yet handle the null entries correctly
+- doesn't work with xdvipdfmx: if e.g. Producer is null it fills it with the standard text.
+- doesn't work with dvips
+- a future pdftex will have \pdfomitinfodict to suppress the info completly.
+
+
diff --git a/l3pdfmeta.dtx b/l3pdfmeta.dtx
index e68c650..b23da41 100644
--- a/l3pdfmeta.dtx
+++ b/l3pdfmeta.dtx
@@ -222,6 +222,17 @@
% tested from TeX, but in a current LaTeX normally ToUnicode are set for all fonts.
% \item[|tagged|] that is set in A-2a and A-3a and means that the pdf must be
% tagged. This is currently neither tested not enforced somewhere.
+% \item[|Trailer_no_Info|] The \texttt{Info} dictionary
+% has been deprecated since quite some time. Metadata should be set with
+% XMP-data instead. In PDF A-4 now the \texttt{Info} dictionary
+% shall not be present in the trailer dictionary at all
+% (unless there exists a PieceInfo entry in the Catalog). And if it is present
+% it should only contain the \texttt{/ModDate} entry. The engines
+% do not offer currently an option to suppress the dictionary completly,
+% one can only give the entries the value null (it only works for all entries
+% with lualatex and pdflatex). The next pdflatex will offer \cs{pdfomitinfodict}.
+% Until then l3pdfmeta does nothing with this requirement.
+%
% \end{description}
%
% \subsubsection{Tests with values and special handlers}
More information about the latex3-commits
mailing list.