[cairo] PDF backend: PDF trailer not written?

Adrian Johnson ajohnson at redneon.com
Sat Dec 6 04:07:00 PST 2008


Sascha Steinbiss wrote:
> Adrian Johnson wrote:
>>  cairo_move_to (cr, 30, 1080.38);
>>  cairo_line_to (cr, 3237760.172, 1080.38);
>>  cairo_stroke (cr);
>>
>> The large out of range x coordinate causes acroread to pop up an error 
>> dialog.
>>
>> I don't know if this is a cairo bug or a bug in genometools. It might 
>> be worth checking that all the coordinates you are passing to cairo 
>> are correct.
> 
> Actually, these coordinates may be correct at a close zoom level. Is it
> a general problem if coordinates exceed the visible area?

According to ISO-32000 Annex C (Implementation Limits) PDF does not 
restrict the size of things in the file format however a conforming 
reader does have limits. Section C.2 lists the minimum limits that 
should be accommodated by conforming readers. It lists a maximum page 
size of 14,400 by 14,400 points.

So using a page size or coordinates larger than 14,400 is not guaranteed 
to work on all PDF readers.

Cairo also has its own limits. Due to the use of 24.8 fixed-point for 
path coordinates, coordinates are limited to +/- 8,388,607.




More information about the cairo mailing list