Our PDF contains lots of \label{foo} commands, where we jump to from links from within the PDF (using the hyperlinks package)

When I tried to jump to there from within our PDF displaying application, which uses the Poppler library, I however failed to find that label.

// C++ code to find the label 'foo' in the document
Poppler::LinkDestination *linkDest = m_doc->linkDestination("foo");

When I instead tried to use the \hyperdef command, I was able to do what I wanted


Doing in our PDF application

Poppler::LinkDestination *linkDest = m_doc->linkDestination("foo.bar");

Can anyone please explain the technical difference between these commands? We would like to be able to keep using \label if possible, since we have a large LaTex codebase that uses it.


Since 2012/07/28 v6.82u package hyperref provides option destlabel for this purpose.

| improve this answer | |
  • For the time being until we update, I just use \hyperdef and the other form of \hyperref like \hyperref{}{cat}{name}{}. I just couldn't find whether an empty URL is allowed, but it works! :) – Johannes Schaub - litb Nov 6 '12 at 13:34

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.