I am trying to add other xmp metadata to a pdf file which is not covered by hyperxmp. I tried to use both hyperxmp and xmpincl. Building the project in TeXnicCenter produces no errors, so I am thinking including and using both packages is okay. But when I extract the xmp file through a java code, the only xmp metadata stored in the xmp file is those created with hyperxmp. Am I doing something wrong, or it is really not possible to use both packages?


1 Answer 1


You can't directly use the packages hyperxmp and xmpincl together in one document, as you'll end up with a PDF file including two incompatible XMP metadata entries. However, you can reuse the XMP code produced by hyperxmp as suggested in the manual:

hyperxmp and xmpincl can complement each other. An author may want to use hyperxmp to produce a basic set of XMP code, then extract the XMP code from the PDF file with a text editor, augment the XMP code with any metadata not supported by hyperxmp, and use xmpincl to include the modied XMP code in the PDF file.

To facilitate this process a bit, you can create a document metadata.tex where you set all the metadata using hyperxmp and write the resulting XMP code to a file metadata.xmp:



  % Create XMP code and write it to macro \hyxmp@xml
  % (cf. hyperxmp.sty, \hyxmp@construct@packet (ll. 847-868))
<x:xmpmeta xmlns:x="adobe:ns:meta/" x:xmptk="3.1-702">^^J%
  % Write content of \hyxmp@xml to file metadata.xmp

% Specify the XMP metadata here
  pdfcopyright={(c) 2013 by Author}

The purpose of this document is to generate a file \texttt{metadata.xmp} containing XMP metadata.

This will produce a file metadata.xmp, which you can modify according to your needs and include it into your main document afterwards:




This is the main document, using the XMP metadata found in \texttt{metadata.xml}.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .