[prev in list] [next in list] [prev in thread] [next in thread] 

List:       kde-bugs-dist
Subject:    [Bug 61922] Some PDF files fail to print
From:       Allyn Tennant <allyn.tennant () msfc ! nasa ! gov>
Date:       2004-06-25 18:37:38
Message-ID: 20040625183738.4317.qmail () ktown ! kde ! org
[Download RAW message or body]

------- You are receiving this mail because: -------
You are on the CC list for the bug, or are watching someone who is.
      
http://bugs.kde.org/show_bug.cgi?id=61922      




------- Additional Comments From allyn.tennant msfc nasa gov  2004-06-25 20:37 -------
So far, I've heard nothing back from bug-ghostscript gnu org

I reported the bug and a workaround to Redhat, see:

https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=126446

For the benefit of people who don't track RedHat bug reports, here
is the key information:

The problem is in a loop in gdevpsu.c (in the ghostscript source tree)
where it looks up the width and height in a table.  If the current
width and height don't *exactly* match a value in a table, then the
code falls though the loop and generates the "null setpagesize"
PostScript ("null" is the last entry in the table).  I have no idea
why anyone would think that the width and height always be found in
the table for *all* files.  So the real problem may be deeper...

Below I show the context diff of a very simple (and very dirty) fix
that I put in which works for us.  If the code falls though the loop
(without finding a match) I decrement the pointer, which causes
p->size_name to point to "/letter" instead of "null".  This is not
really intended to be a general fix, but it works fine for us (in
the USA) and clearly demostrates the nature of the problem.

                                        Allyn

----------------------------------------------------------------------
*** gdevpsu.orig        2003-01-16 18:49:01.000000000 -0600
--- gdevpsu.c   2004-06-03 15:31:44.024345004 -0500
***************
*** 273,278 ****
--- 273,280 ----
        while (p->size_name[0] == '/' &&
               (p->width != width || p->height != height))
            ++p;
+ /* If size_name is "null" then decrement pointer back to /letter */
+         if ( p->size_name[0] == 'n' ) --p;
        pprintd2(s, "%d %d ", width, height);
        pprints1(s, "%s setpagesizen", p->size_name);
      }
[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic