After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 133924 - landscape mode prints strange looking text
landscape mode prints strange looking text
Status: RESOLVED FIXED
Product: gnome-print
Classification: Deprecated
Component: PDF backend
2.4.x
Other Linux
: Normal major
: ---
Assigned To: Jody Goldberg
Jody Goldberg
: 152326 (view as bug list)
Depends on:
Blocks:
 
 
Reported: 2004-02-09 21:23 UTC by Christian Biesinger
Modified: 2005-11-15 02:22 UTC
See Also:
GNOME target: ---
GNOME version: 2.9/2.10


Attachments
.gnumeric file (3.62 KB, application/octet-stream)
2004-02-09 21:24 UTC, Christian Biesinger
Details
generated pdf file (bzip2-compressed) (76.62 KB, application/octet-stream)
2004-02-09 21:25 UTC, Christian Biesinger
Details

Description Christian Biesinger 2004-02-09 21:23:08 UTC
Using gnumeric 1.2.6-1 with gnomeprint 2.4.2-2 (debian package versions).

If I try to print a file in landscape mode as pdf, what I get is a pdf file
with correct looking grid lines, but totally wrong text; it looks a bit
like it was drawn 90° rotated compared to where it should be, and cut off.

Steps to reproduce:
Load attached gnumeric file
Verify File|Page Setup shows landscape page orientation
Click Print in the page setup dialog
Select PDF output
Verify that the "Paper" tab shows Landscape orientation
Click Print

I'll attach the .gnumeric and .pdf file.
Comment 1 Christian Biesinger 2004-02-09 21:24:47 UTC
Created attachment 24249 [details]
.gnumeric file
Comment 2 Christian Biesinger 2004-02-09 21:25:31 UTC
Created attachment 24250 [details]
generated pdf file (bzip2-compressed)
Comment 3 Andreas J. Guelzow 2004-02-10 01:18:00 UTC
It's really not that strange, it's just not landscape.
Comment 4 Andreas J. Guelzow 2004-09-11 00:20:34 UTC
*** Bug 152326 has been marked as a duplicate of this bug. ***
Comment 5 Jody Goldberg 2004-09-11 16:59:59 UTC
I beleive this is fixed in 2.7.90
Comment 6 Frederic Crozat 2004-09-13 13:04:31 UTC
Hmm, I've backported your change on gnome-print-pdf.c on 2.6.2 and I'm still
seeing the problem (but maybe I missed something)..
Comment 7 Frederic Crozat 2004-12-29 13:58:47 UTC
Reopening, still valid with libgnomeprint 2.8.2
Comment 8 Owen Taylor 2005-03-12 21:43:28 UTC
Actually, the change in gnome-print-pdf.c looks wrong to me ... before
the change, the code was busted in that the call to art_affine_scale() 
was overwriting the initialization of Tm from ctm. But that gave a *closer*
to right result, since according to the PDF docs, the text matrix is
composed with the ctm before use. 
Comment 9 Owen Taylor 2005-03-12 21:51:18 UTC
Turns out that last comment is wrong, since the "CTM" is passed to the PDF
backend *per* primitive, and not set in the PDF file permanently.
I'm still not sure that the computations are right.
Comment 10 Owen Taylor 2005-03-12 22:18:32 UTC
On some investigation, I'm pretty sure that using 

 dx + pgl->glyphs[ps->start].x
 dy + pgl->glyphs[ps->start].y

is in fact wrong, but pgl->glyphs[ps->start].x/y are pretty typically
zero so it doens't matter much. (*)

Can you give details of how you are reproducing, Frederic? I don't
see any problems here.

(*) dx/dy are the last two components of the CTM, so this has the effect
that the glyph origin starts at  CTM * (0, 0) + (dx, dy)
in device space. While we actually want CTM * (dx, dy). So, something
like:
  
 point.x = pgl->glyphs[ps->start].x
 point.y = pgl->glyphs[ps->start].y
 art_affine_point (&point, &point, ctm);
 
Then use point.x/point.y.
Comment 11 Frederic Crozat 2005-03-14 17:19:58 UTC
Ohh, my bad, it seems to be fixed in 2.8.2 (and 2.10 too).

I got busted with the test case because :
-if you open the test case and check print preview or print settings, you see
landscape
-then you choose print, choose PDF and print.

Unfortunately, when you open "print" dialog, the first available printer is
selected (unually not PDF "printer") and landscape get unselected and replaced
by portrait.

I'll suggest we close this bug..
Comment 12 Jody Goldberg 2005-03-15 19:12:10 UTC
owen : good point.  I'll add the map.
fcrozat : ok.  we'll need to solve the general problem of losing settings when
changing printers, but I agree this is not the bug for that.