1

The ChangeLog of pdftex, when enumerating the changes in pdfTeX 3.14159265-2.6-1.40.17 (TeX Live 2016) (May 20, 2016), says:

new primitive \pdfsuppressptexinfo to omit PTEX.* keys from output;

the value is a bitmask:

% 1 -> PTEX.Fullbanner

% 2 -> PTEX.FileName

% 4 -> PTEX.PageNumber

% 8 -> PTEX.InfoDict (/Producer /Creator /CreationDate /ModDate /Trapped)

I wrote the following code:

\documentclass[12pt,a4paper]{article}
\usepackage[utf8]{inputenc}

\author{Joe Six Pack} \title{Lecture 1}

\pdfsuppressptexinfo15

\begin{document}

Hello world!

\end{document}

I have this pdftex:

$ pdftex --version
pdfTeX 3.141592653-2.6-1.40.22 (TeX Live 2021)
kpathsea version 6.3.3
Copyright 2021 Han The Thanh (pdfTeX) et al.
There is NO warranty.  Redistribution of this software is
covered by the terms of both the pdfTeX copyright and
the Lesser GNU General Public License.
For more information about these matters, see the file
named COPYING and the pdfTeX source.
Primary author of pdfTeX: Han The Thanh (pdfTeX) et al.
Compiled with libpng 1.6.37; using libpng 1.6.37
Compiled with zlib 1.2.11; using zlib 1.2.11

I compiled my code, and then i called exiftools on the result. Here is the output:

$ exiftool -All -a test.pdf
ExifTool Version Number         : 12.30
File Name                       : test.pdf
Directory                       : .
File Size                       : 21 KiB
File Modification Date/Time     : 2022:01:30 05:49:44+01:00
File Access Date/Time           : 2022:01:30 05:49:44+01:00
File Inode Change Date/Time     : 2022:01:30 05:49:44+01:00
File Permissions                : -rw-r--r--
File Type                       : PDF
File Type Extension             : pdf
MIME Type                       : application/pdf
PDF Version                     : 1.5
Linearized                      : No
Page Count                      : 1
Producer                        : pdfTeX-1.40.22
Creator                         : TeX
Create Date                     : 2022:01:30 05:49:44+01:00
Modify Date                     : 2022:01:30 05:49:44+01:00
Trapped                         : False

We have the producer, the creator, the modified date, the creation date and also trapped.

My understanding is that the number 15 (=1+2+4+8) would set all the bits.

Am I doing something wrong?

robertspierre
  • 638
  • 3
  • 16
  • It seems not to work as intended indeed - although the produced pdf indeed does not contain any PTEX keys the information itself is still there. An easy solution is \usepackage{pdfprivacy} as suggested in https://tex.stackexchange.com/questions/95080/making-an-anonymous-pdf-file-using-pdflatex. But it would still be interesting to know why \pdfsuppressptexinfo behaves in this way. – Marijn Jan 30 '22 at 10:48
  • Note that this package just does \pdfinfo{/Author () /Title () /Subject () /Keywords () } if hyperref is not loaded and \hypersetup{pdfinfo={ Author={}, Subject={}, Title={}, Keywords={} }} if hyperref is loaded. – Marijn Jan 30 '22 at 10:55
  • @Marijn yeah but with those commands the entry is still there, just empty. Instead \pdfsuppressptexinfo was supposed to delete those entries altogether. Or at least set them empty, I don't know. Certainly it should do something, one or the other. – robertspierre Jan 30 '22 at 11:56

1 Answers1

3

The setting is about PTEX keys not about /Creator and /Producer.

The PTEX.Fullbanner is typically in every pdf. The other keys only if you include a pdf. So for example:

\RequirePackage{expl3}
\ExplSyntaxOn
\pdf_uncompress:
\ExplSyntaxOff
\documentclass[12pt,a4paper]{article}

\usepackage{graphicx} \author{Joe Six Pack} \title{Lecture 1}

%\pdfsuppressptexinfo-1

\begin{document} \includegraphics{example-image} Hello world!

\end{document}

If you open the pdf in an editor and look around (and ignore the binary stuff) then you will find this as info catalog:

<<
/Producer (pdfTeX-1.40.23)
/Creator (TeX)
/CreationDate (D:20220130162520+01'00')
/ModDate (D:20220130162520+01'00')
/Trapped /False
/PTEX.Fullbanner (This is pdfTeX, Version 3.141592653-2.6-1.40.23 (TeX Live 2021/W32TeX) kpathsea version 6.3.3)
>>

And in some other place you will find an XObject for the included pdf:

1 0 obj
<<
/Type /XObject
/Subtype /Form
/FormType 1
/PTEX.FileName (c:/texlive/2021/texmf-dist/tex/latex/mwe/example-image.pdf)
/PTEX.PageNumber 1
/PTEX.InfoDict 7 0 R
/BBox [0 0 320 240]
...

And the info dict referenced by 7 0 R will contains info about the included pdf.

7 0 obj
<<
/Producer (pdfTeX-1.40.18)
/Creator (TeX)
/CreationDate (D:20180330175409+02'00')
/ModDate (D:20180330175409+02'00')
/Trapped /False
/PTEX.Fullbanner (This is pdfTeX, Version 3.14159265-2.6-1.40.18 \(TeX Live 2017\) kpathsea version 6.2.3)
>>

If you activate \pdfsuppressptexinfo-1 the PTEX settings will disappear.

You can't remove the /Creator and /Producer from the main info catalog with pdftex, you can only set them to an empty string.

Ulrike Fischer
  • 327,261