Bug 490787 - Okular doesn not show PS images ina DVI doc
Summary: Okular doesn not show PS images ina DVI doc
Status: RESOLVED WAITINGFORINFO
Alias: None
Product: okular
Classification: Applications
Component: DVI backend (show other bugs)
Version: 23.08.5
Platform: Fedora RPMs Linux
: NOR major
Target Milestone: ---
Assignee: Okular developers
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-07-24 17:44 UTC by GianPiero Puccioni
Modified: 2024-07-26 12:34 UTC (History)
1 user (show)

See Also:
Latest Commit:
Version Fixed In:
Sentry Crash Report:


Attachments
Test files ( .tex and .ps) and sample output (65.21 KB, application/x-compressed-tar)
2024-07-24 17:44 UTC, GianPiero Puccioni
Details

Note You need to log in before you can comment on or make changes to this bug.
Description GianPiero Puccioni 2024-07-24 17:44:31 UTC
Created attachment 171957 [details]
Test files ( .tex and .ps) and sample output

SUMMARY
Creating a DVI file froma LaTeX file that includes PostScript documents using Okular to view it results in no image .
and this errors:
  org.kde.okular.generators.dvi.core: ghostview could not be started
  org.kde.okular.generators.dvi.core: GS did not produce output.
ghostview doen't seems to exitst anymore .

STEPS TO REPRODUCE
1. Create a .dvi from LTex thet include PS images
2.  use okular to view it
3. 

OBSERVED RESULT
No image shown


EXPECTED RESULT
Image shown 

SOFTWARE/OS VERSIONS
Windows: 
macOS: 
Linux/KDE Plasma:  Fedora 39 (X11)
(available in About System)
KDE Plasma Version:  5.27.11
KDE Frameworks Version: 
Qt Version: 

A test with a verion of Okular in KDE 6.1.2 - Fedora 40 (Wayland) gave the same result
ADDITIONAL INFORMATION
attached file to Test.
Comment 1 Albert Astals Cid 2024-07-24 22:41:31 UTC
Your eps file seems wrong, just doing

gs test.eps

fails

replacing 

%%BoundingBox: (atend)

by 

%%BoundingBox: 16 18 727 536

in your eps file makes it work.

Are you positive that your eps file should work?
Comment 2 GianPiero Puccioni 2024-07-25 09:27:00 UTC
(In reply to Albert Astals Cid from comment #1)
> Your eps file seems wrong, just doing
> 
> gs test.eps
> 
> fails
> 
> replacing 
> 
> %%BoundingBox: (atend)
> 
> by 
> 
> %%BoundingBox: 16 18 727 536
> 
> in your eps file makes it work.
> 
> Are you positive that your eps file should work?

Thanks for the answer.

I tested the .eps file with okular and the dvi file with xdvi and both worked so I supposed it should... 
I also tried with a .ps file (that has the proper BB) and got the same result: okular on the .ps and xdvi on the .dvi work, okular on the dvi didn't. I never tried ghostscript, I looked for ghostview but couldn't find it.

Moving the BB at the start seems to fix something (I am not sure what, that BB is legal). And okular shows it but if I create a .ps file and use that in LaTex again it works in xdvi but not in okular ( I don't get the GSV error, though).
In all cases above creating a PDF with pdflatex works without problems.
 
G
Comment 3 Albert Astals Cid 2024-07-25 21:18:15 UTC
I don´t know enough about eps to tell you if the file is malformed or not, but gs fails to work with it and we use gs to render the eps files so we can't render it.

If you think that's a bug, you should open a bug against ghostview, and once they fix it, we will immediately start showing it correctly.
Comment 4 GianPiero Puccioni 2024-07-26 10:03:18 UTC
(In reply to Albert Astals Cid from comment #3)
> I don´t know enough about eps to tell you if the file is malformed or not,
> but gs fails to work with it and we use gs to render the eps files so we
> can't render it.
>
 I don't know too, but Okular works without problems on the .ps and . eps so that shouldn't be the problem.
And the .dvi doesn't show even while using the .ps that has the BB at the start
> 
> If you think that's a bug, you should open a bug against ghostview, and once
> they fix it, we will immediately start showing it correctly.

Where can I find ghostview? It's not in the Fedora or RpmFusion repositories

G
Comment 5 Albert Astals Cid 2024-07-26 12:17:23 UTC
Sorry i meant ghostscript.

And yes, sadly we use a different way to render eps standalone than eps inside dvi. We could change it, but it would be an super enormous amount of work for what is almost a dying document format.
Comment 6 GianPiero Puccioni 2024-07-26 12:34:35 UTC
(In reply to Albert Astals Cid from comment #5)
> Sorry i meant ghostscript.
> 
Ok.
> And yes, sadly we use a different way to render eps standalone than eps
> inside dvi. We could change it, but it would be an super enormous amount of
> work for what is almost a dying document format.
I agree and I found out an easy fix vithout editing the file by hand... 
The command "eps2eps file1.eps file2.eps " moves the BB to the top and also creates a HiResBB wich doesn't seem to hurt.

I don't why using a .ps instead of .eps still doesn't work as ghostscript has no problems, but maybe including .ps in LaTeX is not standard, xdvi doesn't like it either.

Thanks for all. 

G Out