Sometimes you are given a PDF created with LaTeX but without hyperref. This is ok for printing but navigating the document on-screen can get annoying if the document is very long.

My question is: assume you do not have access to the LaTeX sources but only to a PDF, created with pdflatex. How can one alter the (uncompressed) PDF so appropriate hyperlinks are added to elements such as cross references, TOC and maybe citations? Naturally, I am looking for automated approaches.

Alternatively, just inserting sensible PDF bookmarks automatically from sections/chapters would be acceptable.

Why this is relevant to LaTeX: my hope is that the compilation process leaves some traces in the PDF about cross references, and this depends on how pdflatex translates them.


  • exclude weird cases where the original LaTeX just imported a bunch of other graphic files containing the contents or obtained from OCR
  • class specific solutions are welcome
  • other simplifying assumptions on how the PDF was generated are acceptable.
  • 10
    There is essentially no information about cross references in the generated pdf. It is possible to more or less manually add links to existing pdfs using acrobat or pdfXchange or similar tools, and this is in fact routinely done by publishing houses. But it's not an automatic process. – David Carlisle Feb 13 '15 at 14:47
  • pdfpages package doesn't help? – touhami Feb 13 '15 at 14:47
  • 2
    This would be a nice feature indeed. @touhami: How should pdfpages help in this case? – user31729 Feb 13 '15 at 14:49
  • 4
    the pdf generated by see section 5 and see section \ref{zzz} is identical so any automated process would have to evaluate the text and do natural language processing to spot references and then spot the place that they refer to. This is not impossible, but it is not easy or generally available as far as I know. If you only have one document to do it is easier to add links manually, and if you have hundreds it is probably cheaper (and I suspect currently more accurate) to pay people to read and re-link the document. – David Carlisle Feb 13 '15 at 14:59
  • @DavidCarlisle thanks for the clarification. From what you are saying hyper-linking cross-refs is too much. Maybe a parser for common TOC formats could be a partial solution? – Bordaigorl Feb 13 '15 at 15:05

Your Answer

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

Browse other questions tagged or ask your own question.