#60059 closed defect (worksforme)
okular @0.20.3 unable to find pdf plugin
Reported by: | jkeller2017 | Owned by: | NicosPavlov |
---|---|---|---|
Priority: | Normal | Milestone: | |
Component: | ports | Version: | 2.6.2 |
Keywords: | Cc: | ||
Port: | okular |
Description
Under OSX 10.15.2 (Catalina), Xcode 11.3.1, Qt: 4.8.7 , KDE Development Platform: 4.14.3, Macport 2.6.2
I installed Kile, and poppler +qt4 +quartz and poppler-qt4-mac.
Okular launches but is unable to open any pdf file :
Okular::Document::openDocument: No plugin for mimetype '"application/pdf"'.
Despite my long efforts, I couldn't find a way to make it work.
Note that Okular opens fine any dvi file but is unable to change their background color in the menu Accessibility / Change paper color : whatever color is fixed, it remains white. Other options are working fine.
Thanks for the help and your contributions in general. J.K
Attachments (2)
Change History (11)
Changed 5 years ago by jkeller2017
Attachment: | listportsinstalled.txt added |
---|
comment:1 Changed 5 years ago by mf2k (Frank Schima)
Keywords: | okular pdf removed |
---|
comment:2 Changed 5 years ago by NicosPavlov
As poppler-qt4 has been deprecated quite some time ago, its use has been deactivated to prevent users to use a potentially insecure library without their knowledge.
In case you want to use poppler-qt4 nevertheless, you need to remove the patch that deactivates its detection and provide the proper path in the okular Portfile. I attach a diff showing the required modifications.
Changed 5 years ago by NicosPavlov
Attachment: | diff-Portfile.diff added |
---|
comment:3 Changed 5 years ago by jkeller2017
Hello,
Many thanks for your quick reply. Unfortunately, I was not able to apply the patch, probably due to the fact I am not used to this procedure. I followed "Manually Applying Patches" from section 4.5.3 and then a clean / build / install of the port but it did not do any improvement, same message error when launching a pdf file. I edited using a port edit but still no change. Best.
comment:4 Changed 5 years ago by NicosPavlov
If you are not familiar with diffs, you could most likely apply this one manually, as it consists in deleting a line and adding two.
The key point is that you will need to create a local port file to contain your changes. The procedure is referenced in the link.
comment:5 Changed 5 years ago by jkeller2017
Hi,
Thank you for your reply. Unfortunately, it didn't work. I created a local port inserting the Portfile files with the modification (with the 2 extra lines). Then I removed okular, built the new local port (I am sure it reads the new Portfile file: at the beginning I forgot to add in /files patch-class-visibility-for-dynamic_cast.diff and it couldn't build), and installed it. I get the same error message as above for this new version of okular. Isn't there another thing to fix somewhere else ? Thanks for the help.
comment:6 Changed 5 years ago by NicosPavlov
Did you follow the instructions in kdelibs4?
To start it run the following command: launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist An agent must be started to maintain KDE's desktop file system configuration cache. To start it run the following command: launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist
You need to them loaded for the pdf plugin to work. Otherwise, I guess okular does not find the existing plugins.
comment:7 Changed 5 years ago by jkeller2017
Hi,
Wonderful, that works ! Thanks for the help. First of all, okular is an excellent pdf viewer, light and highly configurable. One can change the background of the pages, so useful for scientists that are reading lots of arxiv documents and typing pdf files. Skim lost this function and Adobe reader is full of bugs and slow.
So let's sum up the installation for the dummies like me that need to install okular :
- install kile port, this will install okular
- install ports poppler +qt4 +quartz and poppler-qt4-mac .
- create a local port (say okular2) using instructions (till step 5) from https://guide.macports.org/chunked/development.local-repositories.html Note that ${prefix} is typically replaced by /opt/local , use kde for category
- copy in the local port, files coming from /opt/local/var/macports/sources/rsync.macports.org/macports/release/tarballs/ports/kde/okular (Portfile and the 'files' directory)
Edit Portfile in the local port adding the 2 lines+ removing one line from https://trac.macports.org/attachment/ticket/60059/diff-Portfile.diff
- uninstall the official okular (force yes), clean, build and install the new port okular2
- Do launchctl load -w /Library/LaunchAgents/org.freedesktop.dbus-session.plist
- Do launchctl load -w /Library/LaunchAgents/org.macports.kdecache.plist
comment:8 Changed 5 years ago by NicosPavlov
Resolution: | → worksforme |
---|---|
Status: | assigned → closed |
I am closing the ticket as worksforme, as it has been indirectly solved, and does not require any change in the repository Portfile.
comment:9 Changed 5 years ago by NicosPavlov
As an additional note, it might be better to just supersede the original port by keeping the port name okular instead of okular2 to avoid potential file conflicts. If the name okular2 is used, the field name in the Portfile has also to be changed
installed ports