imagetoraster cuts height in half (CUPS 1.1.18)

Brion Finlay none at
Fri Jan 21 08:14:25 PST 2005

I am trying to print an image (GIF or PNG) to a CUPS printer.  The image 
is 300 pixels by 420 pixels at 200 dpi.

My PPD for my printer specifies a page size of 312x425 points (it's a 
small printer) and an imageable area of 294x413 points.  At 200dpi, that 
should give me about 830 dots x 1166 dots.

When I send my image through cups, it goes through the imagetoraster 
filter, it cuts the height in half.  cupsWidth=828 which is acceptable, 
but cupsHeight=573, which is approximately half of the 1166 dots that I 
should have.

Here is the log (at debug level):
D [20/Jan/2005:16:18:11 +0000] [Job 3] Before scaling: xppi=198, 
yppi=198, zoom=0.00
D [20/Jan/2005:16:18:11 +0000] [Job 3] Before scaling: xprint=4.1, 
D [20/Jan/2005:16:18:11 +0000] [Job 3] Image size is 1.5 x 2.1 inches...
D [20/Jan/2005:16:18:11 +0000] [Job 3] Auto orientation...
D [20/Jan/2005:16:18:11 +0000] [Job 3] xpages = 1, ypages = 1
D [20/Jan/2005:16:18:11 +0000] [Job 3] PageSize = [312 425]
D [20/Jan/2005:16:18:11 +0000] [Job 3] cupsWidth = 828
D [20/Jan/2005:16:18:11 +0000] [Job 3] cupsHeight = 573

the command used to print was simply "lpr image.png".  No options were 
specified, and no options are saved (with lpoptions).

xppi=198 and yppi=198 are roughly correct - imagetoraster derived them 
from the PNG file.

xprint=4.1, yprint=5.7 seem to represent the size of the page in inches?

the image size is approximately 1.5 x 2.1 inches

The PageSize is correct - 312 x 425 points

cupsWidth is correct - 828 dots

cupsHeight is incorrect - 2 * 573 = 1146 dots which would be close to 
what I expect.

The output I get is the image printing on the top half of the page only, 
and "squished".  The printed image is wider than it is tall, but the 
entire image is scaled to fit.

The printed output dimensions are about 2 3/8" wide x 1 5/8" tall, which 
is almost the reverse dimensions of what the image should be - 1.5 x 2.1 

If I print the image to a PDF file using Acrobat, and then submit that 
PDF to CUPS, the image prints properly.

Does anyone know how to fix this?

More information about the cups mailing list