Enrico Masala originally wrote an easy-to-use Java program to embed Creative Commons metadata into PDF files using XMP. This program is Free Software and does not require Adobe Acrobat Professional; furthermore, it can be modified fairly easily to run "headlessly" and insert the license XMP into PDF files automatically.
When you run the application by launching its JAR, you are greeted with this window. Choosing "File->Open" will let you select a PDF, and the drop-down Clicking on "Advanced" will show you the XMP embedded in the PDF. Choosing a license from the "Update License" widgets will, obviously, let you choose a license.
The program also has a command line interface that can be accessed by running the JAR with command line arguments.
You can check it out of our Subversion:
The main development happens in the "trunk" directory. You can also download the source and precompiled .class files in a ZIP file (without a bundled copy of iText; see the README for information on that).
Just run "make pdflicensemanager.jar" in the trunk/ directory (or wherever else you have a copy of the source).