Skip to content

Commit

Permalink
document suppressing of info dictionary
Browse files Browse the repository at this point in the history
  • Loading branch information
Ulrike Fischer committed May 5, 2022
1 parent 0ef7237 commit 9f6861b
Show file tree
Hide file tree
Showing 2 changed files with 37 additions and 0 deletions.
26 changes: 26 additions & 0 deletions 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.


11 changes: 11 additions & 0 deletions l3pdfmeta.dtx
Expand Up @@ -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}
Expand Down

0 comments on commit 9f6861b

Please sign in to comment.