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.

I have created using pdfx a pdf using this command:

\usepackage[a-1b]{pdfx}

I would add metadata but I don't really understand how do it.

I read the doc but I didn't understand

pdfx guide

share|improve this question
    
My preamble is too long... and I have a lot of input –  Mazzy Dec 21 '12 at 23:13
1  
Why duplicate questions? –  egreg Dec 21 '12 at 23:15
    
what questions duplicate? –  Mazzy Dec 21 '12 at 23:16
2  
This one: tex.stackexchange.com/questions/87909/… –  egreg Dec 21 '12 at 23:17
    
is it different...there I'm asking how insert metadata using hypersetup...here I'm asking how insert data using pdfx –  Mazzy Dec 21 '12 at 23:20
add comment

1 Answer

up vote 11 down vote accepted

From pdfx manual:

2.1. Data file for XMP metadata

As mentioned above, standards compliant PDF documents need XMP metadata to be included. In order to create XMP in the prescribed XML format, a simple data file holding the meta information of the document needs to be created either through a program or by hand. For our purposes, we name it as \jobname.xmpdata, a simple example of which will look like the following:

  \Keywords{pdfTeX\sep PDF/X-1a\sep PDF/A-b} 
  \Title{Sample LaTeX input file} 
  \Author{LaTeX project team}
  \Org{TeX Users Group}

So you have to put the xmpdata in a separate file. We can do it using filecontents:

\documentclass{article}

\usepackage{lipsum}
\usepackage[a-1b]{pdfx}
\usepackage{filecontents}
\begin{filecontents*}{\jobname.xmpdata}
\Keywords{pdfTeX\sep PDF/X-1a\sep PDF/A-b} 
\Title{Sample LaTeX input file} 
\Author{LaTeX project team} 
\Org{TeX Users Group}
\Doi{123456789} 
\end{filecontents*}
\begin{document}
\lipsum

\end{document}

enter image description here

To compile this you may have to download the ICC profile (ISOcoated_v2_300_bas.ICC) from here: Color management ISO profile. Simply rename the downloaded file as FOGRA39L.ICC and save it in pdfx folder (or in localtexmf folder where tex can find it). A file name data base refreshing will be necessary.

As noted by Enrico there is a bug in pdfx. The command \Subject won't work. To counter this simply put (Thanks to Enrico):

\newcommand{\Subject}[1]{\gdef\xmpSubject{#1}}

before \usepackage[a-1b]{pdfx}

share|improve this answer
1  
There is a bug in pdfx.sty: the \Subject command is not recognized in the XMP data file. It's sufficient to add \newcommand{\Subject}[1]{\gdef\xmpSubject{#1}} after \usepackage[...]{pdfx} –  egreg Dec 21 '12 at 23:58
    
Looking at the .sty file one sees that \xmpSubject is initialized to \xmpKeywords, but the corresponding macro for setting \xmpSubject at runtime is missing. I'm inclined to consider this a bug, as \Subject is a documented interface. –  egreg Dec 22 '12 at 0:01
    
@egreg: Thanks. Please leave your comments here (I mean don't delete them). I will try to ping CVR. –  Harish Kumar Dec 22 '12 at 0:06
    
Sorry, I will fix this and will get back as soon as possible. Many thanks for the time of all. –  CV Radhakrishnan Dec 22 '12 at 4:33
    
@CVRadhakrishnan: Thank you very much. :-) –  Harish Kumar Dec 22 '12 at 5:31
add comment

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.