How to add copyright information to PDF metadata

As egreg notes, rights information is not part of the document information directory. But it can be included in the document's extensible metadata profile.

Here are two solutions that work with Adobe Acrobat and pdflatex. I don't know if you will see the metadata in the same place as you do with Acrobat; PDF XChange Viewer is a Windows app and I have a Mac so I can't test it.

Also (potential showstopper, wish I had noticed this earlier) neither solutions works with xetex. Perhaps they could be cajoled but that would require patching the package.

xmpincl

  1. Make sure you have the xmpincl package. It's in TeX-live.

  2. Create a basic XMP file like this:

    <x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="Adobe XMP Core 5.2-c001 63.139439, 2010/09/27-13:37:26        ">
       <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
          <rdf:Description rdf:about=""
                xmlns:xmpRights="http://ns.adobe.com/xap/1.0/rights/">
             <xmpRights:Marked>True</xmpRights:Marked>
          </rdf:Description>
          <rdf:Description rdf:about=""
                xmlns:dc="http://purl.org/dc/elements/1.1/">
             <dc:rights>
                <rdf:Alt>
                   <rdf:li xml:lang="x-default">Copyright (C) 2012 by Brent Longborough.  All rights reserved.</rdf:li>
                </rdf:Alt>
             </dc:rights>
          </rdf:Description>
       </rdf:RDF>
    </x:xmpmeta>

Let's call it copyright.xmp. If you want to grant more rights you can; you just need something more detailed. Creative Commons has a page to help you generate an XMP file.

  1. Include this license file in your document like this:

    \documentclass{article}
    \title{My article}
    \author{Brent Longborough}
    \usepackage{xmpincl}
    \includexmp{copyright}
    \usepackage{lipsum}
    
    \begin{document}
    \maketitle
    \lipsum
    \end{document}
    

That's it! When I open the document in Adobe Acrobat I can see the copyright information in the expected place. If I select File > Properties ... and click on "Additional Metadata..." it's there.

enter image description here

hyperxmp

The hyperxmp implements extra document information keys pdfcopyright and pdfcopyrighturl that can be declared in much the same way as \pdfinfo keys. Under the hood it creates the XMP file for you. So you only need a file like this:

\documentclass{article}
\title{My article}
\author{Brent Longborough}
\usepackage{hyperref}
\usepackage{hyperxmp}
\hypersetup{
    pdfauthor={Brent Longborough},
    pdfcopyright={Copyright (C) 2012 by Brent Longborough.  All rights reserved.}
}
\usepackage{lipsum}

\begin{document}
\maketitle
\lipsum
\end{document}

Also doesn't work in xetex, though.


The main reference should be the "PDF Reference book", fourth edition, that on page 714 lists the known entry types for the document information dictionary:

Title, Author, Subject, Keywords, Creator, Producer, CreationDate, ModDate, Trapped

On page 713 it says

Note: Although viewer applications can store custom metadata in the document information dictionary, it is inappropriate to store private content or structural information there; such information should be stored in the document catalog instead (see Section 3.6.1, “Document Catalog”).

However, on page 882 (Appendix E), it says

Note: New keys for the document information dictionary (see Section 10.2.1, “Document Information Dictionary”) or a thread information dictionary (in the I entry of a thread dictionary; see Section 8.3.2, “Articles”) need not be registered.

Not the expected answer, I guess. PDF viewers won't know how to access the information, if they are not programmed to.

EDIT

With Adobe Reader X your keys are recognized:

enter image description here


Your code will work (as egreg points out) and write the keys and their values to the PDF info dict, but I don't know of any standardised keys for this information. You'll probably have better luck with XMP (sorry, Wikipedia is blacked out because of SOPA). There isn't much support for XMP with LaTeX, though.