TeX - LaTeX Stack Exchange is a question and answer site for users of TeX, LaTeX, ConTeXt, and related typesetting systems. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

There appears to be a conflict with using the hyperref package and pdfcomment. Take the following example:


I get a warning message from hyprerref related to pdftex being called twice and that it changes nothing. I don't really like to leave a document with warning messages on the compilation. If I change the order of the packages, then there is an outright error. The error relates the the hidelinks option, though I think it is probably a problem with other options too. If I remove the option, then the code will compile without error or warning (provided that pdfcomment is loaded first.)

Any ideas about a resolution for this: should I be passing a bug report onto either of these two parties?

share|improve this question
up vote 7 down vote accepted

I don't think you need to be worried about this: what you're getting is a Warning message, not an Error message:

Package hyperref Warning: Option `pdftex' has already been used,
(hyperref)                setting the option has no effect on input line [xx].

This warning message is generated by LaTeX while it's setting up the pdfcomment package, which (among others) also loads the hyperref package.

Furthermore, because pdfcomment loads the hyperref package anyway, you needn't even load hyperref separately. After loading the pdfcomment package, just issue the command \hypersetup{hidelinks,<any other options>}.

Finally, it may be worth noting that hyperref checks which engine is compiling the document; if it's "pdftex", it automatically enables the pdftex option for you -- no need for you to specify it.

share|improve this answer
Thanks for this. I basically don't like warning messages... I'm a kind of neat freak. this was helpful, I didn't know about the \hypersetup command, so the solution is still kind of elegant. One should make sure that the pdfcomment package is loaded in the same place as hyperref (relative to other packages) or else some odd warning messages can come up. – aghsmith Jan 27 '12 at 22:12

Your Answer


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.