Bug 436870

Summary: Document Catalog OpenAction not respected
Product: [Applications] okular Reporter: Christopher Yeleighton <giecrilj>
Component: PDF backendAssignee: Okular developers <okular-devel>
Status: REOPENED ---    
Severity: normal CC: aacid, nate
Priority: NOR    
Version: 21.04.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Christopher Yeleighton 2021-05-10 13:52:36 UTC
SUMMARY
The purpose is to create a PDF file that loads a Web page when opened.

STEPS TO REPRODUCE
1. (cd /tmp && cat >OpenAction.ps << 'EOF' &&
[ /OpenAction << /Type /Action /S /URI /URI (http://www.adobe.com) >>
/DOCVIEW pdfmark
[ /Rect [ 10 10 30 30 ] /Action /Launch /Subtype /Link /URI (http://www.adobe.com) /SrcPg 1 /ANN pdfmark
10 10 moveto
30 10 lineto
30 30 lineto
10 30 lineto
closepath
fill
showpage
EOF
 ps2pdf OpenAction.ps &&
 okular OpenAction.pdf)

OBSERVED RESULT
Okular

EXPECTED RESULT
Adobe: Creative, marketing and document management solutions

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma: 5.12.0-2-default
(available in About System)
KDE Plasma Version: 5.21.5
KDE Frameworks Version: 5.81.0
Qt Version: 5.15.2

ADDITIONAL INFORMATION
Comment 1 Albert Astals Cid 2021-05-10 21:45:00 UTC
> EXPECTED RESULT
> Adobe: Creative, marketing and document management solutions

You are using the wrong software i think.
Comment 2 Christopher Yeleighton 2021-05-11 06:14:00 UTC
I am sorry for making you mad.  Please replace (http://www.adobe.com) with (https://bugs.kde.org/) in the recipe and the expected result will be the KDE Bugtracking System.
You see, Okular is supposed to open PDF.  PDF has an interactive component to it.  Opening embedded hyperlinks is one of the functionalities of this component, so Okular is supposed to do that.
Note that Okular does open one kind of hyperlinks, represented as annotations over regions in the document.  But this is not the only kind of hyperlink placement a PDF reader is supposed to handle.
Comment 3 Laura David Hurka 2021-05-11 11:10:47 UTC
(In reply to Christopher Yeleighton from comment #0)
> SUMMARY
> The purpose is to create a PDF file that loads a Web page when opened.

At maximum I would expect that it shows one of these blue banners on top, which says “the document wants to open the external URL http://www.adobe.com in a web browser. [Open URL in <browser>] [Close]”

Opening any website without the user wanting it seems very insecure to me. Embedding a hyperling in the document seems the only appropriate method.
Comment 4 Christopher Yeleighton 2021-05-11 12:42:26 UTC
(In reply to David Hurka from comment #3)
> Opening any website without the user wanting it seems very insecure to me.
> Embedding a hyperling in the document seems the only appropriate method.

You might wish to note that Konqueror does not offer any warning upon encountering the REFRESH tag in the document head.