cairo: limit image size when printing

1 bpp image formats can have very large sizes. Even if the maximum
cairo image size is not exceeded, it still uses a huge amount of memory
and is very slow.

This limits the image size when printing to 8192x8192 which is
sufficient for 300ppi at A2 size. Cairo >= 1.5.10 scales mime images
to the same dimensions as the cairo image, so the original mime image
can still be embedded.

Bug 103399
1 file changed