printing options

ray michael r_mikaelo at yahoo.com
Tue Dec 21 21:39:33 PST 2004


hi michael!

thanks for the prompt reply. i think i've set the page size properly
through the PPD file. for testing purposes, i've tried printing a 11 in
x 8.5 in jpeg on a "borderless" paper size. i have entries on my ppd
file describing this "borderless" paper size, dimensions, imageable
area, etc:
   *PageSize BorderlessLetter/Borderless (Letter): "<< /PageSize [612
      791] /Orientation 0 >>setpagedevice"

now everything comes out fine if i try printing my jpeg image using
these options:
   lpr -o PageSize=BorderlessLetter -o scaling=100 test.jpg

and here is a snippet of the cups log (set to debug):
   [Job 207] Page = 612x791; 0,0 to 612,791
   [Job 207] Searching for profile "/Plain"...
   [Job 207] ImageOpen("/var/spool/cups/d00207-001", 3, 3, 100, 0,
      0xfef3a450)
   [Job 207] num_components = 3
   [Job 207] jpeg_color_space = JCS_YCbCr
   [Job 207] Converting image to RGB...
   [Job 207] JPEG image 1056x816x3, 96x96 PPI
   [Job 207] max_ics=20...
   ...
   [Job 207] Before scaling: xppi=0, yppi=0, zoom=1.00
   [Job 207] Before scaling: xprint=8.5, yprint=11.0
   [Job 207] img->xppi = 96, img->yppi = 96, aspect = 1.000000
   [Job 207] Portrait size is 8.50 x 6.57 inches
   [Job 207] Landscape size is 10.99 x 8.49 inches
   [Job 207] Auto orientation...
   [Job 207] Using landscape orientation...
   [Job 207] xpages = 1, ypages = 1
   [Job 207] PageSize = [612 791]
   [Job 207] cupsWidth = 5100
   [Job 207] cupsHeight = 6591
   [Job 207] cupsBitsPerColor = 8
   [Job 207] cupsBitsPerPixel = 24
   [Job 207] cupsBytesPerLine = 15300
   [Job 207] cupsColorOrder = 0
   [Job 207] cupsColorSpace = 1
   [Job 207] img->colorspace = 3

the problem occurs when i set scaling to 100 and explicitly specify
printing using landscape mode.
   lpr -o PageSize=BorderlessLetter -o scaling=100 -o landscape test.jpg

again here is a snippet of the cups log:
   [Job 206] Page = 612x791; 0,0 to 612,791
   [Job 206] Searching for profile "/Plain"...
   [Job 206] ImageOpen("/var/spool/cups/d00206-001", 3, 3, 100, 0,
      0xfef330b0)
   [Job 206] num_components = 3
   [Job 206] jpeg_color_space = JCS_YCbCr
   [Job 206] Converting image to RGB...
   [Job 206] JPEG image 1056x816x3, 96x96 PPI
   [Job 206] max_ics=20...
   ...
   [Job 206] Before scaling: xppi=0, yppi=0, zoom=1.00
   [Job 206] Before scaling: xprint=8.5, yprint=11.0
   [Job 206] img->xppi = 96, img->yppi = 96, aspect = 1.000000
   [Job 206] Portrait size is 8.50 x 6.57 inches
   [Job 206] Landscape size is 10.99 x 8.49 inches
   [Job 206] Using landscape orientation...
   [Job 206] xpages = 1, ypages = 1
   [Job 206] PageSize = [791 612]
   [Job 206] cupsWidth = 6591
   [Job 206] cupsHeight = 6591
   [Job 206] cupsBitsPerColor = 8
   [Job 206] cupsBitsPerPixel = 24
   [Job 206] cupsBytesPerLine = 19773
   [Job 206] cupsColorOrder = 0
   [Job 206] cupsColorSpace = 1
   [Job 206] img->colorspace = 3

please notice that cupsWidth is now set to '6591' instead of '5100',
which makes the raster image 'sqauare' and wider than the selected
paper size. any thoughts on this? is there something that i've missed?
in my PPD perhaps?


many thanks,

michael.q


Michael Sweet wrote:
> Anonymous wrote:
> > ...
> > by the way, i noticed that if you explicitly set the landscape option
> > and the scaling option to 100% (lpr -o landscape -o scaling=100
> > <file>), cupsWidth and cupsHeight values (from the raster header) are
> > both equal to the larger dimension (ie, 6000x6000 for a 10x3 image,
> > instead of 6000x1800). this results in a "square" raster image much
> > larger than my papersize. is this a bug or is this the designed
> > behaviour? how should i handle this scenario?
>
> That shouldn't happen.  If you are using a standard (fixed) page
> size, then the raster image will always be the same size.  If you
> use a custom size (via CustomPageSize and a PageSize=Custom.WxH)
> then the image filter will treat the custom size as a maximum size
> and resize the page accordingly.
>
> --
> ______________________________________________________________________
> Michael Sweet, Easy Software Products           mike at easysw dot com
> Internet Printing and Publishing Software        http://www.easysw.com





More information about the cups mailing list