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

-
My preamble is too long... and I have a lot of input –  Mazzy Dec 21 '12 at 23:13
Why duplicate questions? –  egreg Dec 21 '12 at 23:15
what questions duplicate? –  Mazzy Dec 21 '12 at 23:16
–  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

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}


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}

-
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