The Last(?) Word
I have now accepted @MatthewLeingang's answer. This directs me to the hyperxmp
package, which appears to be the simplest solution (for me as a very-end user). The fact that this doesn't work in my workflow and environment isn't Matthew's fault.
To chase the rest of my problem, which appears to involve a conflict with memoir
, readers may be interested in this spin-off question.
Thank you all again for your help.
Progress Update 1:
First, flouting convention, my sincere thanks to all who have answered or commented (duly upvoted). Special thanks to @diabonas, whose sample PDF does indeed contain a copyright notice.
However, there may be a clue here: while his PDF says this:
PDF Producer: XeTeX 0.9997
mine says this:
PDF Producer: xdvipdfmx (0.7.8)
Now, I'm processing it with XeLaTeX via latexmk
, but to keep myself honest, I re-did it with just XeLaTeX, with the same result.
Progress Update 2:
Here's an MWE that fails, and gives "PDF Producer: xdvipdfmx (0.7.8)":
% !TEX TS-program = XeLaTeX
% !TEX encoding = UTF-8 Unicode
\documentclass{memoir}
\usepackage{lipsum}
\usepackage{hyperref}
\usepackage{hyperxmp}
\hypersetup{
pdfauthor={Brent Longborough},
pdftitle={O Hai},
pdfcopyright=Copyright © 2012 by Brent Longborough. All rights reserved.}
\begin{document}
\lipsum[1]
\end{document}
By just changing the document class to article, we get "PDF Producer: XeTeX 0.9997", and the copyright notice appears!
Original Question:
Using XeLaTeX. I want to add two pieces of metadata to a PDF: copyrighted status and the copyright notice.
I'm already using hyperref
in the document, and I have no special worries about "overheads", only about keeping the workflow simple.
On the principle of "monkey see, monkey do", I tried this to no avail:
\hypersetup{%
pdfinfo={%
CopyrightStatus={Copyrighted},
CopyrightNotice={Copyright © 2012 by Brent Longborough}
}
}
So far, I have been unable to find the correct tag names, or to discover even whether I have a chance.
All suggestions are welcome, but I'd especially like a pointer to the book of tag names for PDF metadata.
The answers and comments from Martin and EGreg deserve some additional explanation on my part.
My PDF reader is PDF Xchange Viewer from Tracker Software. When I view the Document Properties, and select the "Additional Metadata…" button, a [third] window appears in which there appear a dropdown labelled "Copyright Status:", with options "Unknown", "Copyrighted", and "Public Domain"; and a text box labelled "Copyright Notice:":
So you can see the source of my half-blind groping for metadata tags…
So, I guess what I'm really asking is "What tag names should I be using to fill in these fields?"
After hacking at the PDF (using @egreg's tip and then the viewer itself), I found the Copyright stuff in some RDF dc: namespace. I have since tried using the hyperxmp package, but without success (nothing shows up in the PDF), and I suspect that may be because it only works for pdfLaTeX.
I have also tried @MatthewLeingang's answer, but can confirm that it definitely requires pdfLaTeX, and I really don't want to go back.
Best Answer
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
Make sure you have the
xmpincl
package. It's in TeX-live.Create a basic XMP file like this:
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.Include this license file in your document like this:
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.
hyperxmp
The
hyperxmp
implements extra document information keyspdfcopyright
andpdfcopyrighturl
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:Also doesn't work in
xetex
, though.