HP DeskJet 1220C Pagesize=Custom.WxHin incorrect output.

Bug #42234 reported by Ivan Matveich
14
Affects Status Importance Assigned to Milestone
foomatic-filters (Ubuntu)
Fix Released
Medium
Unassigned

Bug Description

lpr -P DeskJet-1220C -o PageSize=SuperB
     -o Quality=1200PhotoCMYK -o scaling=100 test.jpg

works as expected, printing test.jpg as large as possible on the page. But

lpr -P DeskJet-1220C -o PageSize=Custom.13x19in
     -o Quality=1200PhotoCMYK -o scaling=100 test.jpg

or any other WxHin size specification prints incorrect pages. For instance, PageSize=Custom.8x8in chops off one-third of the image.

Revision history for this message
Ivan Matveich (ivan-matveich) wrote : Even worse,

PageSize=Photo and PageSize=5x8 also yield incorrect output. The size of the printed image is correct but the image is not properly scaled. It is too large. Only one corner of it is printed.

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Testing with a HP DeskJet 1120C, changing PageSize have NO effect on printing (seems that A4 is the only output size)...

Changed in cupsys:
status: Unconfirmed → Confirmed
Revision history for this message
Ivan Matveich (ivan-matveich) wrote : Re: [Bug 42234] Re: HP DeskJet 1220C Pagesize=Custom.WxHin incorrect output.

On 5/24/06, VETSEL Patrice <email address hidden> wrote:
> Testing with a HP DeskJet 1120C, changing PageSize have NO effect on
> printing (seems that A4 is the only output size)...

Are you printing images or postscript files? The cups image filter
seems to have bugs. I wrote to a guy at HP and he also reported
problems with the cups image filter.

I now use the attached script to print my images. It works fine.

#!/usr/bin/env ruby

require 'RMagick'
include Magick

$margin_inches = 0.25

def usage
  puts <<END
Usage: deskjet <page-width-in-inches> <image-file>

    eg, deskjet 13 joe.ppm
        deskjet 8.5 fred.jpg
        deskjet 6 mandy.png
END
  exit 1
end

def postscript_of_image(imagefile, psfile, width)
  i = Image.read(imagefile).first
  i.rotate! 90 if i.columns > i.rows

  r = 1200
  m = ($margin_inches / width) * i.columns
  o = Image.new i.columns + m * 2, i.rows + m * 3
  o.composite! i, m, m, ReplaceCompositeOp
  o.write(psfile) do |x|
    x.page = Geometry.new width * r, nil, nil, nil
    x.density = r
  end

  o = Image.read(psfile).first
  [o.columns, o.rows]
end

usage if ARGV.length != 2

width = ARGV[0].to_f
usage if width > 13 or width <= 0

imagefile = ARGV[1]
usage unless File.stat(imagefile).readable?

psfile = "/tmp/deskjet-#{$$}.ps"
at_exit { begin File.unlink psfile; rescue; end }

print "Processing #{imagefile}... "; $stdout.flush
w, h = postscript_of_image(imagefile, psfile, width)
puts "load sheet of minimum size %.02fx%.02fin." % [w/72.0, h/72.0]
system 'lpr', '-P', 'DeskJet-1220C', '-C', imagefile,
    '-o', "PageSize=Custom.#{w}x#{h}",
    '-o', 'Quality=1200PhotoCMYK', psfile

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

Your script work fine. So i think like you. I'm investigating...

Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :
Revision history for this message
Patrice Vetsel (vetsel-patrice) wrote :

answer :
"
The image filters automatically resize custom page sizes to the actual size required for printing to limit paper waste on roll-fed plotters. There is no way to override this behavior.

Normally this is not a problem, however Foomatic is AFU with embedded custom sizes because it passes the custom size to the driver instead of using the size from the upstream filter. As a result, the driver is expecting one size while the data is providing another.

The solution is to not use Foomatic.
"

Changed in cupsys:
status: Confirmed → In Progress
Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

I have fixed it upstream now, in foomatic-rip (package foomatic-filters). Get foomatic-rip from the OpenPrinting site:

wget http://www.openprinting.org/foomatic-rip

and replace /usr/bin/foomatic-rip by the downloaded file. With this version custom page sizes should work correctly. Especially test printing images directly with CUPS, like for example as you did in the beginning:

lpr -P DeskJet-1220C -o PageSize=Custom.13x19in
     -o Quality=1200PhotoCMYK -o scaling=100 test.jpg

This should work now.

Revision history for this message
Till Kamppeter (till-kamppeter) wrote :

Here is the new foomatic-filters package:

http://www.linux-foundation.org/~till/tmp/ubuntu/feisty/foomatic-filters/binary/

They are on their way into Feisty.

Changed in foomatic-filters:
status: In Progress → Fix Committed
Changed in foomatic-filters:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.