\usepackage{tgtermes}% This is clone of Nimbus 9 used for mass market paperbac$

\pdftitle{title}

\pdfauthor{author}

\pdfsubject{subject}

\pdfkeywords{keywords}

test

\end{document}

This time, pdflatex generated a pdf file. But the file has:

LaTeX Error: MissingLaTeX produced printed output before encountering a begindocument command.Either you forgot the begindocument command or there is something wrong in thepreamble. The problem may be a stray character or an error in a declaration—forexample, omitting the braces around an argument or forgetting the in a commandname.test