Consider the following MWE to be compiled with `pdflatex' that attaches the `foo.tex' file to the PDF: --8<---------------cut here---------------start------------->8--- \begin{filecontents*}{foo.tex} \documentclass{article} \begin{document} Foo. \end{document} \end{filecontents*} % \documentclass{article} \usepackage{xcolor} \usepackage[color=black]{attachfile2} \begin{document} \textattachfile{foo.tex}{Link to `foo.tex'}. \end{document} --8<---------------cut here---------------end--------------->8--- The link is supposed to open `foo.tex' but: 1. Okular doesn't consider it as a link (the mouse pointer doesn't change to the finger when you hover above the link). 2. Nevertheless: - a double (left) click opens an empty annotation where you expect the attached `foo.tex' file to be open, - a right click only allows to save the attached `foo.tex' file, not to open it. By contrast, Adobe Reader and Evince do the expected job: a click on the link open the `foo.tex' file with the default `.tex` editor (Evince having the drawback to open it with a different name: `foo.tex.xxx', where `xxx' is a random string). `foo.tex.xxx' instead, where `xxx' is a random string. The file open has the same content as `foo.tex' but, because of its strange extension, is not open as a `.tex' file by the underlying text editor. Notice that Adobe Reader opens this file with the same name. Reproducible: Always Steps to Reproduce: 1. Compile the above file with `pdflatex`. 2. Open the corresponding PDF with Okular. 3. Double click on the text: "Link to ‘foo.tex’". Actual Results: An annotation is open. Expected Results: The attached file should be open in the (external) default editor for `.tex` files.
Don't make my life harder than it needs to be, please attach all the files needed to reproduce the problem you're speaking about.
Created attachment 95155 [details] Here is the PDF file, `bar.pdf', to which the `foo.tex' file is attached.
You can access the file by right clicking, but on a second read of the pdf spec it seems it hints the user should be able to view/save the file on left clicking. Since running stuff is always ugly security wise i'll just show the save dialog and let the user carry on from there.
Git commit a675670ddaefc6da554523b6a6dfc8d1e1073e2b by Albert Astals Cid. Committed on 27/10/2015 at 23:28. Pushed by aacid into branch 'Applications/15.08'. Save file attachments on left click Instead of having to right click on it and choosing save from the menu M +10 -0 ui/pageview.cpp http://commits.kde.org/okular/a675670ddaefc6da554523b6a6dfc8d1e1073e2b
>Since running stuff is always ugly security wise i'll just show the save dialog and let the user carry on from there. I agree security matters but too bad the ability to directly open the file is disabled: what about a warning and/or allow only some types of files to be directly open (PDF and text files, e.g. .tex ones)? Once again, Adobe Reader and Evince allow this.
feel free to create a wish item about that, i consider this fixed as files are more easily accessible now.
Done: https://bugs.kde.org/show_bug.cgi?id=354538.