Comment 31 for bug 1242678

Revision history for this message
In , Marek Kašík (mkasik) wrote :

(In reply to comment #1)
> The issue reported there seems to be also what makes evince fails to render
> some eps files on e.g recent Ubuntu versions
>
> That has been reported on
> https://bugzilla.gnome.org/show_bug.cgi?id=710957
> https://bugs.launchpad.net/libspectre/+bug/1242678
> http://bugs.ghostscript.com/show_bug.cgi?id=694979
>
> The ghostscript bugs has details
>
> "...
> Basically, this isn't a bug. If you want to rotate an EPS you absolutely
> should NOT be doing so by using /Orientation, which is a media selection
> parameter. You should instead use '90 rotate' or similar to set up the CTM
> before you render the EPS."
>
> @Marek: I tried your patch on some of the files from the Ubuntu bug, e.g
> https://bugs.launchpad.net/libspectre/+bug/1242678/+attachment/3886169/
> +files/test.eps ... it fixes the "nothing is displayed" but the orientation
> seems wrong (rotated from 90° compared to gs and 180° compared to what
> portrait should be (e.g axis/labels are wrong)). Not sure if that's a bug in
> the documents or in the change though

I think that the problem is in evince. It sets wrong angle for rendering with spectre_render_context_set_rotation() from my point of view. evince rotates to left by setting new angle to "original_angle - 90". If you reverse the value passed by evince to libspectre (360 - angle) then it works as expected.