Take the 2-minute tour ×
TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. It's 100% free, no registration required.

Is there a way to change the properties that are added to PDF docs? For instance, when I go the Properties panel in Acrobat, I see:

Application: LaTeX with hyperref package

PDF Producer: PdfTeX-1.40.11

PTEX.Fullbanner: This is pdfTeX Version 3.1415926-1.40.11-22 (TeX Live 2010)

These are the only ones I see with my version of Acrobat, but there might be more embedded in the PDF.

I am wondering if there are settings to control the values of the properties that are embedded in the PDF doc. I recall a case where Acrobat had embedded the login userid in it, but I don't see that here on my Mac. I would like to customize all these properties, unless of course they are necessary (I am assuming that the list of fonts is required in order to be able to display the PDF properly).

There most likely is a way to do this with Acrobat Pro, but that would require me to do this separately for each file.

share|improve this question
2  
    
Thanks. I had not seen those as I didn't think of searching for hyperref related questions (even though it is metioned in the Application info) –  Peter Grill Jul 16 '11 at 22:41

2 Answers 2

up vote 11 down vote accepted

There are at least two ways of doing this.


Option 1: During production of the LaTeX document and using the hyperref package. In the manual it mentions you can set the following document property information:

  • Title field (via pdftitle)
  • Author field (via pdfauthor)
  • Subject field (via pdfsubject)
  • Creator field (via pdfcreator)
  • Producer field (via pdfproducer)
  • Keywords field (via pdfkeywords)
  • and many others.

To that effect, you could use

\documentclass{minimal}
\usepackage[%
  pdftitle={My Title},%
  pdfauthor={My Author},%
  pdfsubject={My Subject},%
  pdfproducer={My Producer},%
  pdfkeywords={keyword1,keyword2}]{hyperref}
\begin{document}
  This is just some dummy text.
\end{document}

Option 2: You can modify/update the PDF document properties during post-production via the PDF Toolkit using the following command line execution:

pdftk <inputfile> update_info <pdf_info> output <outputfile>

The text file <pdf_info> looks like a key-value list for each of the fields you intend to update.

share|improve this answer
5  
You should set these settings using \hypersetup{..} and not as package options. It avoids the overhead and potential troubles with LaTeX's option handling routine. –  Martin Scharrer Jul 16 '11 at 22:46

You can change the Creator and Producer fields with hyperref:

\documentclass{article}

\usepackage{hyperref}

\hypersetup{
    pdfcreator={Hello},
    pdfproducer={World}
}

\begin{document}

Hello World

\end{document}

The third field is more interesting and requires more investigation. It certainly can be seen inside the PDF file, but Evince and pdfinfo don't show it… The field is also mentioned in the pdfTeX manual.

Let's look at the pdfTeX source code. In src/texk/web2c/pdftexdir/pdftex.web we see

pdf_str_entry_ln("PTEX.Fullbanner", pdftex_banner);

and

@d pdfTeX_banner=='This is pdfTeX, Version 3.1415926',pdftex_version_string

where

@d pdftex_version_string=='-1.40.11' {current \pdfTeX\ version}

pdf_str_entry_ln outputs its arguments directly:

procedure pdf_str_entry(s, v: str_number); {print out an entry in
dictionary with string value to PDF buffer}
…

procedure pdf_str_entry_ln(s, v: str_number);
begin
    if v = 0 then
        return;
    pdf_str_entry(s, v);
    pdf_print_nl;
end;

So, the text is hardcoded, and you're out of luck with this field on the TeX side — unless you edit the source code.

share|improve this answer
1  
I don't think that the "banner" can be controlled by the user. –  egreg Jul 16 '11 at 22:27
    
Thanks for digging up that. I am not sure why I am unable to reset this with \pdfinfo{/PTEX.Fullbanner (My LaTeX)} –  Peter Grill Jul 17 '11 at 0:51
2  
@peter-grill: You will only add another entry for /PTEX.Fullbanner to the info dict, thus ending with two identical keys in the dictionary. There is no way to suppress the writing of the key by pdfTeX. –  Martin Schröder Jul 17 '11 at 11:34

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.