[cairo] Re: Some thoughts on metadata

Michael Sweet mike at easysw.com
Mon May 1 13:20:10 PDT 2006

Carl Worth wrote:
> On Mon, 01 May 2006 15:58:36 -0400, Michael Sweet wrote:
>>> Or should cairo generate pages with both [0 0 SHORT LONG] and [0 0
>>> LONG SHORT] for the bounding boxes? That would let viewer applications
>>> do the obvious thing and users would see the correct result. And then
>>> would CUPS step in and rotate the content as necessary so that the
>>> printer receives the content it needs?
>> Yes, and this is the way I would recommend you do it since there
>> are printers that print on landscape media (that is, the long edge
>> is the leading edge...) and you need to support both types of
>> devices.  Using SHORT LONG for portrait and LONG SHORT for
>> landscape is guaranteed to work in all circumstances.
> Thanks. It's very helpful to get solid advice like this.
> With this approach, and given a document that has both portrait and
> landscape pages in it, would the header comment be:
> 	%%BoundingBox: 0 0 LONG LONG

In the document header, use %%BoundingBox: (atend)

In the page header, use %%PageBoundingBox: 0 0 W H

In the document trailer, use %%BoundingBox: 0 0 MAXW MAXH

I'm working on a how-to guide for creating PS print files to
be included with CUPS 1.2; I'll post a link once it is in usable

 > ...
> easier to use if we just provide a page_size API of (width,height) and
> always set the initial CTM to put the origin in a consistent spot on
> the page, (which for cairo is the upper-left corner).

Good enough!

Michael Sweet, Easy Software Products           mike at easysw dot com
Internet Printing and Document Software          http://www.easysw.com

More information about the cairo mailing list