[cairo] Postscript and odd paper sizes...

Rick Brownrigg brownrig at ucar.edu
Tue Feb 9 10:35:41 PST 2010

Some applications do not correctly recognize the page size in cairo- 
generated postscript when the page is something other than 8.5"x11";   
in particular, the "ps2pdf" utility, and MacOSX's "preview". This is  
true regardless of whether the size is specified via the call to  
cairo_ps_surface_create(), or a subsequent call to  

Inspecting the postscript output reveals that the DSC comment "% 
%BoundingBox" is properly set to reflect the page size.  However, a  
colleague tells me that the correct way to specify this is via:

<</PageSize [widthPts heightPts]>> setpagedevice

Indeed, when I manually add this to the cairo-output, the  
aforementioned apps seem to work as expected. Section 6.2 of the  
postscript 3 manual seems to indicate this is the correct way to  
specify page size (http://www.adobe.com/devnet/postscript/pdfs/ 

Rick Brownrigg

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.cairographics.org/archives/cairo/attachments/20100209/28ffb830/attachment.htm 

More information about the cairo mailing list