MediaSize and PageSize synchronisation

Arne Glenstrup panic at itu.dk
Sat May 13 16:22:09 PDT 2006


Hi,


I am having trouble with the cups gs driver; for a printer
with special paper sizes (notably, without A4, Letter and
other standard sizes), it first sets PageSize correctly,
but then resets PageSize to Letter, i.e. [612, 792].

Looking in espgs-8.15.2/pstoraster/gdevcups.c:2706, I see
that this PageSize update is triggered ir PageSize OR
.MediaSize are set, but in espgs-8.15.2/pstoraster/gdevcups.c:2815-2864,
only MediaSize is used; PageSize is not checked.  Is this
correct?

The snippet of debug output that indicates incorrect behaviour
is this:

DEBUG: PageSize = [ 161 142 ], HWResolution = [ 300 300 ]
DEBUG: HWMargins = [ 0.000 0.000 0.000 0.000 ]
DEBUG: matrix = [ 4.167 0.000 0.000 -4.167 -0.000 591.667 ]
DEBUG2: cups_get_params(0x57efd8, 0x7fffff9901f0)
DEBUG2: before gdev_prn_get_params()
DEBUG2: after gdev_prn_get_params()
DEBUG2: Leaving cups_get_params()
DEBUG2: cups_put_params(0x57efd8, 0x7fffff9901f0)
DEBUG: Setting LeadingEdge to 0...
DEBUG2: cups_set_color_info(0x57efd8)
DEBUG: cupsEncodeLUT[0] = 0
DEBUG: cupsEncodeLUT[65535] = 1
DEBUG: num_components = 1, depth = 1
DEBUG: cupsColorSpace = 3, cupsColorOrder = 0
DEBUG: cupsBitsPerPixel = 1, cupsBitsPerColor = 1
DEBUG: max_gray = 1, dither_grays = 2
DEBUG: max_color = 0, dither_colors = 0
DEBUG2: cups_get_space_params(0x57efd8, 0x7fffff98fec0)
DEBUG: cache_size = 8388608
DEBUG: Updating PageSize to [612 792]...
DEBUG: size = Custom
DEBUG: margins[] = [ 0.000000 0.000000 0.000000 0.000000 ]
DEBUG: Reallocating memory, [612 792] = 2550x3300 pixels...

I wonder why it decides to update the PageSize?

-- Arne




More information about the cups-devel mailing list