After generating a pdf via latex using the hyperref package the links do not work within okular. Reproducible: Always Steps to Reproduce: 1. Generate a document using hyperref, example below: -- cut here --- \documentclass[a4paper]{article} \usepackage{hyperref} \begin{document} \title{Test} \maketitle \section{Section 1} \label{sec:1} \section{Section 2} Test \ref{sec:1}. \end{document} --- cut here --- 2. compile with pdflatex article.tex && pdflatex article.tex 3. open article.pdf with okular Actual Results: links do not work Expected Results: links should move the reader to the specified link. I think this is a bug in okular because if I open the exact same pdf in evince the links are working.
Attach the file please
Created attachment 73381 [details] tex file
Created attachment 73382 [details] pdf file with links not working in okular Here's the pdf in which the link does not work in okular.
Works here, which poppler version are you using?
[cassio@arch ~]$ pacman -Q poppler poppler 0.20.3-1
I have been having the same problem for a while now. Don't know when it started. I am using poppler and okular from git head.
I did a few more tests. Hyperlinks don't work with my distribution's (Debian Testing) poppler and okular either. I see the red and green boxes around the link, but the cursor doesn't change while hovering over them, and clicking doesn't do anything either. Hyperlinks do work in evince, though, so I guess it is not a poppler issue. Could this be something in my distribution? Say a bug in one of the Debian qt packages?
Oliver, I don't think it's specific to your distribution, as I'm running Arch Linux. Maybe it's a combination of the poppler and okular versions we're running. The pdf works fine in evince here too.
It does work for me. When I click on the [1] in the line with "Test [1]", the page view scrolls in a way that "Section 1" is at the top of the page. Tested with: - the attached PDF and a PDF compiled from the tex (tex->dvi->pdf) on Debian testing (KDE SC 4.8.4, Okular 0.14.3, poppler 0.18.4) - the attached PDF on Fedora 16 (KDE SC 4.8.5 and that version of Okular, poppler 0.18 iirc, can't check now)
@Luigi, I think this is a new bug. I'm running okular 0.15.0 with KDE 4.9.00 and poppler 0.20.3
I got it fixed for me. No bug, apparently I screwed something up mixing KDE stuff from Debian with handcompiled stuff. When I really(!) removed all my hand-compiled code the links started working again. (that's okular 0.14.3). Sorry for the noise.
I'm betting that's what happens to Cássio to since i'm using 0.15.0 and 0.20.3 too with no problem. I will try to get my arch machine updated, but it's been a while and it complains a lot when trying to update
@Albert, Sorry, I haven't mixed any self-compiled code with kde packages. I haven't messed with any packages in that way. At the time of this post my machine is fully up to date. I'm using the standard Arch kde, okular and poppler packages. It might be a bug introduced on those packages. Other than that I don't see how something I did could have produced these results. Let me know if I can provide any additional info.
I just upgraded my arch installation and it works fine there too. Question, are you using "trim margins"? Can you ldd /usr/lib/poppler.so.27 ldd /usr/lib/poppler-qt.so.4 ldd /usr/lib/kde4/okularGenerator_poppler.so
@Albert: Thanks for looking into this. I figured it out. My "text selection" button was activated, that causes links to not work. If I return to "Browse" then the links work. Sorry for causing the inconvenience. Still, I don't understand why links are disabled if you are in text selection mode. Is this a bug or a design decision?
Design decision
A really stupid and unintuitive design decision! Should be reverted to «works as expected»!
(In reply to comment #17) > A really stupid and unintuitive design decision! Should be reverted to > «works as expected»! As you see, a lot of people, including me, have a lot of trouble with this «design decision». Normally I am browsing all the PDFs in text-selection, because it is normal to me to here and there copy some text. Before googling around and reading all through this ticket, I had no idea what the problem could be. That's absolutely not how software should work! Software should be intuitive and work as expected. The bare minimum is to show some kind of infomation, such as: «Hyperlinks are disabled due to text selection mode.»
Learn to use bugzilla. If you have a wish, open a bug report and expose that wish. Reopening a bug that says "pdf links generated with hyperref latex package do not work" is silly, because they do work.
Ok, I opened a new report, see https://bugs.kde.org/show_bug.cgi?id=318078
Stop reopening this bug.
Leaving the blames if it is a design decision or something else, I support that when I read a (LaTeX) pdf, the 90% of time is in "Text selection mode". I know that there are technique reasons to enable hyperlinks only in "Browse mode", but maybe the Okular team could reconsider it. I mean, Evince is a very simple pdf viewer, but it makes the job good enough.
I agree with all of you! And thanks for the hint with "browse" mode. I'm constantly in "Text selection mode" and this "feature" just cost me at least half an hour of googeling and checking package versions. I thought I was missing a LaTex package or so...instead it's a feature of Okular...