# [pdftex] PTEX.FileName contains file system information

Stephan Hennig mailing_list at arcor.de
Sat Aug 4 23:33:25 CEST 2007

Hi,

when an external pdf graphics is included into a LaTeX document with the
line

\includegraphics{pic}

the resulting file contains a line

> /PTEX.FileName (pic.pdf)

That is, the names of imported pdf files can be seen in the output file
by inspecting it with an editor.  What is the rationale for putting file
system related information into pdf output?

If the imported file lies in a subdirectory 'graphics' and is loaded via

\includegraphics{graphics/pic}

the directory name can also be found in the output pdf:

> /PTEX.FileName (graphics/pic.pdf)

Even worse, when a file from a subdirectory is included without
specifying a path, but setting TEXINPUTS to contain that directory the
output pdf contains the complete absolute path of the included file:

> /PTEX.FileName (A:/bbbbb/latex/ccccc/dddddddddddd/eeeee/graphics/pic.pdf)

I'd prefer not to tell every recipient of my documents how I'm
organizing my working environment, but to keep such information private.
I'm really disappointed to see pdfLaTeX spreading such information.
What purpose does the /PTEX.FileName tag serve?  If it is mandatory part
of pdf files, would a random identifier to /PTEX.FileName serve the same
purpose as a true file name?

In case it is not mandatory part of a pdf file, I make the following
proposal:  Add a switch or primitive that controls whether the line is
written to pdf files or not.  By default, do either of

(a)  Do not write the /PTEX.FileName line.
(b)  Leave the argument to /PTEX.FileName blank.
(c)  Make the argument to /PTEX.FileName a random identifier.

What do you think?

Best regards,
Stephan Hennig

\documentclass{article}
\usepackage{graphics}
\begin{document}
\includegraphics{pic}% A pdf file.
\end{document}

> >pdflatex -version
> MiKTeX-pdfTeX 2.6.2748 (1.40.4) (MiKTeX 2.6)
> Copyright (C) 1982 D. E. Knuth, (C) 1996-2006 Han The Thanh
> TeX is a trademark of the American Mathematical Society.