Postscript "save as" orientation rotated from drawing surface

Bug #1052705 reported by David Mathog
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Inkscape
New
Undecided
Unassigned

Bug Description

When the attached example.svg is printed to a color postscript printer with "save to file" checked the expected orientation is seen when the postscript file is viewed in gsview. However, when in Inkscape: "save as" to Postscript the orientation is rotated 90 degrees clockwise as seen in the same viewer.

The two postscript files will be attached next.

r11664 on Windows XP.
Gsview32 v4.9

Revision history for this message
David Mathog (mathog) wrote :
Revision history for this message
David Mathog (mathog) wrote :
Revision history for this message
David Mathog (mathog) wrote :
su_v (suv-lp)
tags: added: exporting printing
Revision history for this message
su_v (suv-lp) wrote :

Duplicate of bug #437550 “Landscape PostScript output prints incorrectly”?

(AFAIU the different orientation of 'printing to' vs 'saving as' PostScript was intentional, see comment #10 and below by bbyak)

Revision history for this message
David Mathog (mathog) wrote :

Related perhaps, but not identical. Page contents rotated as in that bug, but drawing surface is also rotated, whereas in that bug it was not. So the example in bug #437550 is both rotated and truncated. Compare the PS in post 2
in that thread with the one in post 2 here. I looked for relevant lines in the two PS files attached above and found (arbitrary order within each group):

example_to_postscript.ps:
%%BoundingBox: 0 0 842 596
%%PageBoundingBox: 0 0 842 596
%%DocumentMedia: 297x210mm 842 595 0 () ()
%%PageMedia: 297x210mm

example_to_printer_save_as_file.ps:
%%BoundingBox: (atend)
%%PageBoundingBox: 8 6 580 830
%%PageBoundingBox: 8 6 580 830
%%BoundingBox: 8 6 580 830
%%Orientation: Landscape
%%ViewingOrientation: 0 1 -1 0
%%BeginFeature: *PageSize A4
<</PageSize [595 842]>> setpagedevice

It looks like the PS produced by Cairo is omitting instructions which would tell a viewer the document's orientation, so it is defaulting to portrait. The ViewingOrientation is a rotation matrix (for the image) and the Orientation is for the drawing surface. Oddly, the Cairo output doesn't even have a /PageSize line, which is the only one of the postscript lines above which isn't formally a comment.

Hmm. I wonder if the Cairo one prints properly? Sending it to a printer... No, it does not print correctly. In the original SVG there is a black bordered square (more or less) in the left 2/3rds of a landscape area, within which there are three overlapping colored rectangles. What came out of the printer is that black bordered square and its contents oriented as in the drawing (inner rectangles in the upper left corner of the square), but the square is located in the lower 2/3rds of a Portrait page. Or, if I rotate the physical page to landscape, then the square and its contents are rotated 90 clockwise with respect to their original orientation in the SVG, AND what was the lower left corner of the square is now closest to the upper left corner of the physical page.

Revision history for this message
David Mathog (mathog) wrote :

This attachment looks like what came out of the printer. To make it all I did was go to document properties and change
it from "landscape" checked to "portrait" checked. Which suggested that Cairo was ignoring the "landscape" completely. So save as to postscript... (see next attachment)

Revision history for this message
David Mathog (mathog) wrote :

... and the postscript produced is landscape in gsview (see attached). So something is screwed up.

Revision history for this message
su_v (suv-lp) wrote :

> Hmm. I wonder if the Cairo one prints properly? Sending it to
> a printer... No, it does not print correctly.

AFAIU to be expected - this is what bug #437550 is about [1].

---
[1] reporter of bug #437550 (Adrian Johnson) is a cairo developer, bulia byak (commenter) an inkscape developer.

tags: added: win32
tags: removed: win32
Revision history for this message
Beluga (buovjaga) wrote :

Orientation is identical in Okular vs. Inkscape in all the example files + my own save as .ps from Inkscape.
I find myself hoping for a screenshot at this point.

Arch Linux 64-bit, KDE Plasma 5
Inkscape 0.92pre1 15073 (GTK3)

Revision history for this message
David Mathog (mathog) wrote :

Inkscape "save as..." to postscript is still not adding orientation information, like this:

%%Orientation: Portrait
%%ViewingOrientation: 0 1 -1 0

So what happens becomes a crap shoot - it may or may not come out right, because the ps file doesn't say what the desired orientation is. If instead, in Inkscape, one does "print", checks "print to file" (this is on Windows), and then saves the file, the resulting postscript file will have the two "Orientation" lines coded into it.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.