Bug 411410 - postscript is shown as text
Summary: postscript is shown as text
Status: RESOLVED DOWNSTREAM
Alias: None
Product: okular
Classification: Applications
Component: PS backend (show other bugs)
Version: 1.8.0
Platform: openSUSE Linux
: NOR normal
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2019-08-29 07:45 UTC by kadlecf
Modified: 2019-08-29 08:30 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description kadlecf 2019-08-29 07:45:17 UTC
SUMMARY
Okular shows systematically the postscript source code instead of rendering it


STEPS TO REPRODUCE
1. Take a postscript file with .ps extension. Check for file contents:
in the terminal, the command
 file test.ps
will yield
 test.ps: PostScript document text conforming DSC level 3.0

2. open it with okular 

OBSERVED RESULT
I can read the source in okular, as if I typed "more test.ps" in the terminal. This happens with all kind of .ps files.


EXPECTED RESULT
Postscript file should be rendered

SOFTWARE/OS VERSIONS
OpenSUSE Tumbleweed
KDE Frameworks 5.61.0
Qt 5.13.0 (built against 5.13.0)
The xcb windowing system
Comment 1 Luigi Toscano 2019-08-29 08:14:35 UTC
Are libspectre and the okular/spectre backend available in the okular package? I remember openSUSE maintainers talking about removing part of ghostscript for security concerns, please also try to ask on opensuse channels.
Comment 2 kadlecf 2019-08-29 08:19:59 UTC
(In reply to Luigi Toscano from comment #1)
> Are libspectre and the okular/spectre backend available in the okular
> package? I remember openSUSE maintainers talking about removing part of
> ghostscript for security concerns, please also try to ask on opensuse
> channels.

I think they are. In the package manager (yast), I can see the following:           

libspectre1 - Library for Rendering PostScript Documents 

Version: 0.2.8-2.15 Installed: 0.2.8-2.15
Size: 84.4 KiB Media No.: 0
License: GPL-2.0+
Package Group: Development/Libraries/C and C++
Source Package: libspectre-0.2.8-2.15
Comment 3 Luigi Toscano 2019-08-29 08:24:52 UTC
That's just libspectre, but was Okular compiled with libspectre support?

You should see a generator (a library) inside the okular package (okularGenerator_ghostview.so)
.
For example, for an x86_64/amd64 system the files should be available under:

- Debian/Ubuntu: /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators
- Fedora: /usr/lib64/qt5/plugins/okular/generators
Comment 4 kadlecf 2019-08-29 08:29:40 UTC
(In reply to Luigi Toscano from comment #3)
> That's just libspectre, but was Okular compiled with libspectre support?
> 
> You should see a generator (a library) inside the okular package
> (okularGenerator_ghostview.so)
> .
> For example, for an x86_64/amd64 system the files should be available under:
> 
> - Debian/Ubuntu: /usr/lib/x86_64-linux-gnu/qt5/plugins/okular/generators
> - Fedora: /usr/lib64/qt5/plugins/okular/generators

Not quite sure. Maybe this output helps:

localhost:/usr/lib64 # ls -1 qt5/plugins/okular/generators/
okularGenerator_chmlib.so
okularGenerator_comicbook.so
okularGenerator_djvu.so
okularGenerator_doc_calligra.so
okularGenerator_docx_calligra.so
okularGenerator_dvi.so
okularGenerator_epub.so
okularGenerator_fax.so
okularGenerator_fb.so
okularGenerator_kimgio.so
okularGenerator_md.so
okularGenerator_mobi.so
okularGenerator_odp_calligra.so
okularGenerator_odt_calligra.so
okularGenerator_ooo.so
okularGenerator_plucker.so
okularGenerator_poppler.so
okularGenerator_powerpoint_calligra.so
okularGenerator_pptx_calligra.so
okularGenerator_rtf_calligra.so
okularGenerator_tiff.so
okularGenerator_txt.so
okularGenerator_wpd_calligra.so
okularGenerator_xps.so
Comment 5 Luigi Toscano 2019-08-29 08:30:19 UTC
It seems that Ghostscript support has been split out from Okular in openSUSE and it may removed any time soon:
https://bugzilla.opensuse.org/show_bug.cgi?id=1122797

It's available as a separate package (okular-spectre, https://software.opensuse.org/package/okular-spectre) right now, but it may disappear. You may want to discuss with the openSUSE maintainers.