seb, thanks for the hint. By adding a debug fprintf() line to libspectre /spectre-device.c of the libspectre source package and rebuilding the package I could discover the Ghostscript command line equivalent to the libgs call used in libspectre. It is
gs -dMaxBitmap=10000000 -dSAFER -dNOPAUSE -dNOPAGEPROMPT -P- -sDEVICE=display -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -g402x574 -r57,428571x57,400000 -dDisplayFormat=6359172 -sDisplayHandle=16#7f974c00d6f0 -c '<< /Orientation 3 >> setpagedevice .locksafe' -f ~/Documents/M_1_no_of_ppts.eps Unfortunately, one cannot simply call this on the command line, as the "display" output device is used and this seems to send a bitmap to a specified, existing X window. When rotating the image, only the resolution and size values change in the command line and also the value after "/Orientation". Odd orientations (3, 1) do not display in evince, even orientations (2, 0) do. To run an isolated command line as similar as possible, I tried the "x11" device: gs -dMaxBitmap=10000000 -dSAFER -P- -sDEVICE=x11 -dTextAlphaBits=4 -dGraphicsAlphaBits=2 -g402x574 -r57,428571x57,400000 -c '<< /Orientation 3 >> setpagedevice .locksafe' -f ~/Documents/M_1_no_of_ppts.eps Here the file displayed with all 4 orientations, but the output as wrong for the odd orientations. For the odd orientations we expect the output in landscape orientation, but it appears here also in portrait, so all 4 orientations give portrait output. So something seems to be wrong with how Ghostscript treats this file. -- You received this bug notification because you are a member of Desktop Packages, which is subscribed to evince in Ubuntu. https://bugs.launchpad.net/bugs/1242678 Title: evince cannot render some EPS files Status in Evince document viewer: New Status in “evince” package in Ubuntu: Triaged Status in “ghostscript” package in Ubuntu: Confirmed Bug description: I upgraded to Ubuntu Saucy, evince cannot render EPS files generated by gnuplot. (Just show an empty page.) [how to reproduce] 1. Generate an EPS file using gnuplot by executing the following command. $ gnuplot -e "set terminal postscript; set output 'test.eps'; plot x;" 2. Open the file "test.eps" just created. $ evince "test.eps" The following are what evince writes to the terminal. (evince:24176): EvinceDocument-CRITICAL **: ev_document_get_n_pages: assertion 'EV_IS_DOCUMENT (document)' failed (evince:24176): Gtk-WARNING **: drawing failure for widget `EvView': invalid matrix (not invertible) (evince:24176): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed (evince:24176): Gdk-CRITICAL **: gdk_pixbuf_get_from_surface: assertion 'width > 0 && height > 0' failed 3. Then evince just shows an empty (white) page. === If i rotate 90 or -90 degree by pressing Ctrl+Left or Ctrl+Right key, evince can show this file correctly. === Okular, GIMP, inkscape and gs can show this EPS file. (may be rotated 90 degree, however) ProblemType: Bug DistroRelease: Ubuntu 13.10 Package: evince 3.10.0-0ubuntu2 ProcVersionSignature: Ubuntu 3.11.0-12.19-generic 3.11.3 Uname: Linux 3.11.0-12-generic x86_64 NonfreeKernelModules: nvidia ApportVersion: 2.12.5-0ubuntu2 Architecture: amd64 Date: Mon Oct 21 21:23:15 2013 InstallationDate: Installed on 2013-09-07 (44 days ago) InstallationMedia: Ubuntu 13.04 "Raring Ringtail" - Release amd64 (20130424) MarkForUpload: True SourcePackage: evince UpgradeStatus: Upgraded to saucy on 2013-10-04 (16 days ago) To manage notifications about this bug go to: https://bugs.launchpad.net/evince/+bug/1242678/+subscriptions -- Mailing list: https://launchpad.net/~desktop-packages Post to : desktop-packages@lists.launchpad.net Unsubscribe : https://launchpad.net/~desktop-packages More help : https://help.launchpad.net/ListHelp