Bug 456058

Summary: On macOS, Okular does not handle open document action and does not declare supported file types in Info.plist
Product: [Applications] okular Reporter: Haoyu <yanghaoyu97>
Component: generalAssignee: Okular developers <okular-devel>
Status: REPORTED ---    
Severity: normal CC: nil-admirari
Priority: NOR    
Version: 24.05.1   
Target Milestone: ---   
Platform: Homebrew (macOS)   
OS: macOS   
Latest Commit: Version Fixed In:
Sentry Crash Report:
Attachments: okular interface after drag a PDF file to the Okular icon at Dock

Description Haoyu 2022-06-28 00:03:49 UTC
Created attachment 150210 [details]
okular interface after drag a PDF file to the Okular icon at Dock

SUMMARY
Okular cannot load PDF file by dragging to the Dock icon or "open with".


STEPS TO REPRODUCE
1. Pin "Okular" at Dock.
2. Drag a PDF file to the Okular icon.
OR
1. Right click on a PDF file and "open with", then choose "okular" from "Applications"-"KDE"-"Okular".

OBSERVED RESULT
Okular is open but showing the "welcome to Okular" windows instead of opening the PDF file directly, as seen from the attatchment.


EXPECTED RESULT
The PDF file should be loaded.


SOFTWARE/OS VERSIONS
macOS: Monterey 12.4 running on Apple M1 chip (Macbook pro m1 13'')


ADDITIONAL INFORMATION
1. Open a PDF file from either the "file"-"open" of Okular interface or drag the file directly to an already opened "okular" interface (the "Welcome to Okular" window for example) could load the PDF file normally. 

2. I followed the instruction here (https://gist.github.com/7468696e6b/ec8fa5d6cdb4e80633b9df95869b70c0) to install Okular on my mac.
Comment 1 nil-admirari 2024-06-26 15:53:36 UTC
Encountered the same problem while trying to set Okular as a default DjVu files viewer: https://apple.stackexchange.com/questions/473651/open-djvu-with-an-app-that-doesnt-declare-djvu-support?noredirect=1#comment707323_473651.

Got the response:
> If I remember correctly, the open document action is implemented with AppleEvents.
> It's possible they didn't handle that in the code.