[cups.development] Myths and Truth about `-sDEVICE=bbox`

Johannes Meixner jsmeix at suse.de
Fri Aug 3 02:09:55 PDT 2012


Hello,

On Aug 2 16:34 pipitas wrote (excerpt):
> On 7/31/12 11:53, Johannes Meixner wrote:
>> On Jul 29 04:17 pipitas wrote (excerpt):
....
>>> It doesn't tell you *anything* about landscape or portrait, and
>>> it's not even meant to do so....
>>
>> If the marked area is a square (down to a square with zero size)
>> it cannot tell if it is wider than high.
>> In all other cases it tells if it is wider than high.
>
> Not necessarily. Think of a portrait page that is filled only on
> the upper third...

I get what I expect (long command line wrapped here):
----------------------------------------------------------------------
$ echo -e '%!\n10 560 moveto 585 560 lineto 585 832 lineto
  10 832 lineto closepath stroke showpage\n' | gs -sDEVICE=bbox -
GPL Ghostscript 9.05 (2012-02-08)
....
%%BoundingBox: 9 559 586 833
----------------------------------------------------------------------
As far as I see it shows the marked area correctly.


FYI:

In my "a2ps" examples I use plain "a2ps -1" because plain "-1"
lets a2ps use a predefined layout with a borderline (at least
a2ps that exists in openSUSE ... with all our patches ... urgh!).

Actually I need only that borderline because I must make sure
that a2ps "fills up" the printable area on the paper.

In contrast:
----------------------------------------------------------------------
$ echo Hello | a2ps -1 --borders=no -B -o- | gs -sDEVICE=bbox -
....
%%BoundingBox: 29 804 62 812

$ echo Hello | a2ps -1 -r --borders=no -B -o- | gs -sDEVICE=bbox -
....
%%BoundingBox: 45 31 56 79
----------------------------------------------------------------------
"gs -sDEVICE=bbox" shows the marked area correctly.

But those a2ps calls are not appropriate to show that the meaning
of "landscape" in a2ps (or in whatever application program) can be
different compared to the meaning of "landscape" in PostScript+DSC.

As long as application programs versus PostScript+DSC use different
meanings for "landscape", there will be mess.


Kind Regards
Johannes Meixner
-- 
SUSE LINUX Products GmbH -- Maxfeldstrasse 5 -- 90409 Nuernberg -- Germany
HRB 16746 (AG Nuernberg) GF: Jeff Hawn, Jennifer Guild, Felix Imendoerffer





More information about the cups-devel mailing list