Bug 426064

Summary: Okular is unable to load print previews of PDFs
Product: [Applications] okular Reporter: Aayush Agarwal <aayush.agarwal_wu>
Component: printingAssignee: Okular developers <okular-devel>
Status: RESOLVED DOWNSTREAM    
Severity: normal CC: aacid, fabian
Priority: NOR    
Version: 1.11.0   
Target Milestone: ---   
Platform: openSUSE   
OS: Linux   
Latest Commit: Version Fixed In:

Description Aayush Agarwal 2020-09-01 15:47:33 UTC
SUMMARY

Okular is not loading print previews.

STEPS TO REPRODUCE
1. Open Okular
2. Load any PDF
3. File>Print Preview

OBSERVED RESULT

A window which says "could not load print preview part".

EXPECTED RESULT

A print preview of the PDF, based on my printer page layout.

SOFTWARE/OS VERSIONS

Linux/KDE Plasma: openSUSE tumbleweed 20200826 snapshot (Linux <host> 5.8.2-1-default (71b519a) x86_64 GNU/Linux)
KDE Plasma Version: 5.19.4
KDE Frameworks Version: 5.73.0
Qt Version: 5.15
okular Version: 1.11.0

ADDITIONAL INFORMATION

Opening okular from command line provided me a hint: org.kde.okular.ui: Could not find a PS viewer for the preview dialog.

When I tried to load a print preview for a .odt file, the preview loaded successfully. I don't have files in many different supported formats so I have not checked all of them.
Comment 1 Albert Astals Cid 2020-09-01 17:37:52 UTC
I'm going to bet that someone at opensuse decided not to compile okular with ghostscript support, go and complain to them.
Comment 2 Fabian Vogt 2020-09-01 18:09:53 UTC
(In reply to Albert Astals Cid from comment #1)
> I'm going to bet that someone at opensuse decided not to compile okular with
> ghostscript support, go and complain to them.

The security team suggested strongly to make the ghostscript plugin optional and not installed by default: https://bugzilla.opensuse.org/show_bug.cgi?id=1122797

There's the possibility to show a dialog if this case is detected, I'll start a discussion about that.