** Description changed:

  I am reporting this as a new bug because I want to avoid adding further
  to the mish mash of half fixed bugs that is duplex printing on hp
  printers via cups.
  
  I will warn readers that this will sound like a bit of a rant. But these
  issues have been outstanding for years
  
  1. Take the hpcups.drv driver information from the upstream part of the
  current source package and run it throught the cups ppd compiler in test
  mode, anbd filter the output for failures.
  
  roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL
- roger@dragon:~/ppd-testing$ 
+ roger@dragon:~/ppd-testing$
  
  Result a nice clean file.
  
  2. Take this file and run it through the script debian/local/make-
  duplex-page-sizes-default.sh that is run when this file is installed on
  a system. Then repeat the above test.
  
  roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL
  
  --- Other FAILS removed
  
  hp-photosmart_6510_series.ppd: FAIL
-       **FAIL**  Multiple occurrences of option PageRegion choice name Card4x6.
-       **FAIL**  Multiple occurrences of option PageRegion choice name Hagaki.
-       **FAIL**  Multiple occurrences of option PageRegion choice name Card5x8.
-       **FAIL**  Multiple occurrences of option PageRegion choice name Oufuku.
-       **FAIL**  Multiple occurrences of option PageRegion choice name 
Executive.
-       **FAIL**  Multiple occurrences of option PageRegion choice name A4.
-       **FAIL**  Multiple occurrences of option PageSize choice name Card4x6.
-       **FAIL**  Multiple occurrences of option PageSize choice name Hagaki.
-       **FAIL**  Multiple occurrences of option PageSize choice name Card5x8.
-       **FAIL**  Multiple occurrences of option PageSize choice name Oufuku.
-       **FAIL**  Multiple occurrences of option PageSize choice name Executive.
-       **FAIL**  Multiple occurrences of option PageSize choice name A4.
+       **FAIL**  Multiple occurrences of option PageRegion choice name Card4x6.
+       **FAIL**  Multiple occurrences of option PageRegion choice name Hagaki.
+       **FAIL**  Multiple occurrences of option PageRegion choice name Card5x8.
+       **FAIL**  Multiple occurrences of option PageRegion choice name Oufuku.
+       **FAIL**  Multiple occurrences of option PageRegion choice name 
Executive.
+       **FAIL**  Multiple occurrences of option PageRegion choice name A4.
+       **FAIL**  Multiple occurrences of option PageSize choice name Card4x6.
+       **FAIL**  Multiple occurrences of option PageSize choice name Hagaki.
+       **FAIL**  Multiple occurrences of option PageSize choice name Card5x8.
+       **FAIL**  Multiple occurrences of option PageSize choice name Oufuku.
+       **FAIL**  Multiple occurrences of option PageSize choice name Executive.
+       **FAIL**  Multiple occurrences of option PageSize choice name A4.
  
  --Other FAILS removed
  
  I have removed the many other printer types that fail for clarity. It is
  a feature of the cups ppdc compiler that if you do not specify the -t
  option it will blithely go on and produce the compiled ppds errors and
  all. I personally think that this is a bug and the compiler should
  refuse to produce erroneous ppds, but putting that to one side. Taking
  A4 as an exmaple the hp6510 ppd file now has two definitions for
  PageSize A4.
  
  *PageSize A4/A4 210x297mm: "<</cupsInteger0 26/PageSize[595.44 
841.68]/ImagingBBox null>>setpagedevice"
  and
  *PageSize A4/A4 AutoDuplex 210x297mm: "<</cupsInteger0 26/PageSize[595.44 
832.68]/ImagingBBox null>>setpagedevice"
  
  Same name but different page dimensions. Only the first one will ever be
  seen by the cups system.
  
  3. This above often does not matter when printing from the command line.
  Because PageSize options are not often specified. However, taking as an
  example a gnome desktop application such as  Evince printing a pdf using
  the gtk+ print options with duplex printing selected. In this case a
  PageSize option will be passed to Cups and it will look like this.
  
  D [11/Apr/2016:17:59:54 +0100] [Job 288] argv[5]="InputSlot=Upper
- number-up=1 MediaType=Plain PageSize=Custom.A4.Duplex OutputMode=Normal
+ number-up=1 MediaType=Plain PageSize=Custom.A4 OutputMode=Normal
  ColorModel=KGray Duplex=DuplexNoTumble job-uuid=urn:uuid:4ef4d5ed-
  e47e-3817-4972-b4bfad8ef5d8 job-originating-host-name=localhost date-
  time-at-creation= date-time-at-processing= time-at-creation=1460393994
  time-at-processing=1460393994"
  
- So the PageSize is "Custom.A4.Duplex". The "Custom" bit gets stripped
- off so what is passed down for matching is "A4.Duplex" which in our 6510
- example does not match anything in the ppd. Depending on what other
- defaults are set in the pdd it might print something, but it will most
- likely be clipped (source of numerous duplex margins bugs). In the case
+ So the PageSize is "Custom.A4". The "Custom" bit gets stripped off so
+ what is passed down for matching is "A4" which matches the first
+ occurrence of A4. Depending on what other defaults are set in the pdd it
+ might print something, but it will most likely be clipped. In the case
  of the 6510 it results in this.
  
  D [11/Apr/2016:17:59:55 +0100] [Job 288] Unrecoverable error: rangecheck
  in setpagedevice
  
  Of course the above line only appears in the error_log if you have
  debugging turned on. So the job just appears to stuck in the print queue
  for no reason at all. This is probably another bug.
  
  The work around. This has been mentioned many times in various bug
  reports. You need page sizes, page regions, imageable areas, and paper
  dimensions  with names ending in .Duplex in your ppd. Rename the
  duplicate which has the biggest bottom margin, hopefully this is the one
- with AutoDuplex in the descriptive text. You might make the
- corresponding changes in the drv file if you wish. That will save you
- having to reapply them every time the ppd file is regenerated.
+ with AutoDuplex in the descriptive text. It is probably best to make
+ these entries default as well. You might make the corresponding changes
+ in the drv file if you wish. That will save you having to reapply them
+ every time the ppd file is regenerated.
  
  I realise that I have broken just about every rule in the "bug laws". I
  offer no excuse:-)
  
  Comments please.
  
  Roger
  
  ProblemType: Bug
  DistroRelease: Ubuntu 15.10
  Package: printer-driver-hpcups 3.15.7-0ubuntu4
  ProcVersionSignature: Ubuntu 4.2.0-35.40-generic 4.2.8-ckt5
  Uname: Linux 4.2.0-35-generic x86_64
  ApportVersion: 2.19.1-0ubuntu5
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Mon Apr 11 18:10:41 2016
  InstallationDate: Installed on 2014-05-04 (707 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
  Lpstat: device for HP-Photosmart-6510-series: 
dnssd://Photosmart%206510%20series%20%5BFDAD30%5D._pdl-datastream._tcp.local/?uuid=1c852a4d-b800-1f08-abcd-441ea1fdad30
  MachineType: System manufacturer System Product Name
  Papersize: a4
  PpdFiles: Error: command ['fgrep', '-H', '*NickName', 
'/etc/cups/ppd/HP-Photosmart-6510-series.ppd'] failed with exit code 2: grep: 
/etc/cups/ppd/HP-Photosmart-6510-series.ppd: Permission denied
  ProcEnviron:
-  SHELL=/bin/bash
-  PATH=(custom, no user)
-  LANG=en_GB.UTF-8
-  LANGUAGE=en_GB:en
-  XDG_RUNTIME_DIR=<set>
+  SHELL=/bin/bash
+  PATH=(custom, no user)
+  LANG=en_GB.UTF-8
+  LANGUAGE=en_GB:en
+  XDG_RUNTIME_DIR=<set>
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.2.0-35-generic 
root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
  SourcePackage: hplip
  UpgradeStatus: Upgraded to wily on 2015-10-24 (170 days ago)
  dmi.bios.date: 05/19/2009
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: 0403
  dmi.board.asset.tag: To Be Filled By O.E.M.
  dmi.board.name: P6T SE
  dmi.board.vendor: ASUSTeK Computer INC.
  dmi.board.version: Rev 1.xx
  dmi.chassis.asset.tag: Asset-1234567890
  dmi.chassis.type: 3
  dmi.chassis.vendor: Chassis Manufacture
  dmi.chassis.version: Chassis Version
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvr0403:bd05/19/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP6TSE:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
  dmi.product.name: System Product Name
  dmi.product.version: System Version
  dmi.sys.vendor: System manufacturer

-- 
You received this bug notification because you are a member of Desktop
Packages, which is subscribed to hplip in Ubuntu.
https://bugs.launchpad.net/bugs/1568996

Title:
  Duplex printing does not work properly for HP printers

Status in hplip package in Ubuntu:
  New

Bug description:
  I am reporting this as a new bug because I want to avoid adding
  further to the mish mash of half fixed bugs that is duplex printing on
  hp printers via cups.

  I will warn readers that this will sound like a bit of a rant. But
  these issues have been outstanding for years

  1. Take the hpcups.drv driver information from the upstream part of
  the current source package and run it throught the cups ppd compiler
  in test mode, anbd filter the output for failures.

  roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.upstream | grep FAIL
  roger@dragon:~/ppd-testing$

  Result a nice clean file.

  2. Take this file and run it through the script debian/local/make-
  duplex-page-sizes-default.sh that is run when this file is installed
  on a system. Then repeat the above test.

  roger@dragon:~/ppd-testing$ ppdc -t hpcups.drv.munged | grep FAIL

  --- Other FAILS removed

  hp-photosmart_6510_series.ppd: FAIL
        **FAIL**  Multiple occurrences of option PageRegion choice name Card4x6.
        **FAIL**  Multiple occurrences of option PageRegion choice name Hagaki.
        **FAIL**  Multiple occurrences of option PageRegion choice name Card5x8.
        **FAIL**  Multiple occurrences of option PageRegion choice name Oufuku.
        **FAIL**  Multiple occurrences of option PageRegion choice name 
Executive.
        **FAIL**  Multiple occurrences of option PageRegion choice name A4.
        **FAIL**  Multiple occurrences of option PageSize choice name Card4x6.
        **FAIL**  Multiple occurrences of option PageSize choice name Hagaki.
        **FAIL**  Multiple occurrences of option PageSize choice name Card5x8.
        **FAIL**  Multiple occurrences of option PageSize choice name Oufuku.
        **FAIL**  Multiple occurrences of option PageSize choice name Executive.
        **FAIL**  Multiple occurrences of option PageSize choice name A4.

  --Other FAILS removed

  I have removed the many other printer types that fail for clarity. It
  is a feature of the cups ppdc compiler that if you do not specify the
  -t option it will blithely go on and produce the compiled ppds errors
  and all. I personally think that this is a bug and the compiler should
  refuse to produce erroneous ppds, but putting that to one side. Taking
  A4 as an exmaple the hp6510 ppd file now has two definitions for
  PageSize A4.

  *PageSize A4/A4 210x297mm: "<</cupsInteger0 26/PageSize[595.44 
841.68]/ImagingBBox null>>setpagedevice"
  and
  *PageSize A4/A4 AutoDuplex 210x297mm: "<</cupsInteger0 26/PageSize[595.44 
832.68]/ImagingBBox null>>setpagedevice"

  Same name but different page dimensions. Only the first one will ever
  be seen by the cups system.

  3. This above often does not matter when printing from the command
  line. Because PageSize options are not often specified. However,
  taking as an example a gnome desktop application such as  Evince
  printing a pdf using the gtk+ print options with duplex printing
  selected. In this case a PageSize option will be passed to Cups and it
  will look like this.

  D [11/Apr/2016:17:59:54 +0100] [Job 288] argv[5]="InputSlot=Upper
  number-up=1 MediaType=Plain PageSize=Custom.A4 OutputMode=Normal
  ColorModel=KGray Duplex=DuplexNoTumble job-uuid=urn:uuid:4ef4d5ed-
  e47e-3817-4972-b4bfad8ef5d8 job-originating-host-name=localhost date-
  time-at-creation= date-time-at-processing= time-at-creation=1460393994
  time-at-processing=1460393994"

  So the PageSize is "Custom.A4". The "Custom" bit gets stripped off so
  what is passed down for matching is "A4" which matches the first
  occurrence of A4. Depending on what other defaults are set in the pdd
  it might print something, but it will most likely be clipped. In the
  case of the 6510 it results in this.

  D [11/Apr/2016:17:59:55 +0100] [Job 288] Unrecoverable error:
  rangecheck in setpagedevice

  Of course the above line only appears in the error_log if you have
  debugging turned on. So the job just appears to stuck in the print
  queue for no reason at all. This is probably another bug.

  The work around. This has been mentioned many times in various bug
  reports. You need page sizes, page regions, imageable areas, and paper
  dimensions  with names ending in .Duplex in your ppd. Rename the
  duplicate which has the biggest bottom margin, hopefully this is the
  one with AutoDuplex in the descriptive text. It is probably best to
  make these entries default as well. You might make the corresponding
  changes in the drv file if you wish. That will save you having to
  reapply them every time the ppd file is regenerated.

  I realise that I have broken just about every rule in the "bug laws".
  I offer no excuse:-)

  Comments please.

  Roger

  ProblemType: Bug
  DistroRelease: Ubuntu 15.10
  Package: printer-driver-hpcups 3.15.7-0ubuntu4
  ProcVersionSignature: Ubuntu 4.2.0-35.40-generic 4.2.8-ckt5
  Uname: Linux 4.2.0-35-generic x86_64
  ApportVersion: 2.19.1-0ubuntu5
  Architecture: amd64
  CurrentDesktop: Unity
  Date: Mon Apr 11 18:10:41 2016
  InstallationDate: Installed on 2014-05-04 (707 days ago)
  InstallationMedia: Ubuntu 14.04 LTS "Trusty Tahr" - Release amd64 (20140417)
  Lpstat: device for HP-Photosmart-6510-series: 
dnssd://Photosmart%206510%20series%20%5BFDAD30%5D._pdl-datastream._tcp.local/?uuid=1c852a4d-b800-1f08-abcd-441ea1fdad30
  MachineType: System manufacturer System Product Name
  Papersize: a4
  PpdFiles: Error: command ['fgrep', '-H', '*NickName', 
'/etc/cups/ppd/HP-Photosmart-6510-series.ppd'] failed with exit code 2: grep: 
/etc/cups/ppd/HP-Photosmart-6510-series.ppd: Permission denied
  ProcEnviron:
   SHELL=/bin/bash
   PATH=(custom, no user)
   LANG=en_GB.UTF-8
   LANGUAGE=en_GB:en
   XDG_RUNTIME_DIR=<set>
  ProcKernelCmdLine: BOOT_IMAGE=/vmlinuz-4.2.0-35-generic 
root=/dev/mapper/ubuntu--vg-root ro quiet splash vt.handoff=7
  SourcePackage: hplip
  UpgradeStatus: Upgraded to wily on 2015-10-24 (170 days ago)
  dmi.bios.date: 05/19/2009
  dmi.bios.vendor: American Megatrends Inc.
  dmi.bios.version: 0403
  dmi.board.asset.tag: To Be Filled By O.E.M.
  dmi.board.name: P6T SE
  dmi.board.vendor: ASUSTeK Computer INC.
  dmi.board.version: Rev 1.xx
  dmi.chassis.asset.tag: Asset-1234567890
  dmi.chassis.type: 3
  dmi.chassis.vendor: Chassis Manufacture
  dmi.chassis.version: Chassis Version
  dmi.modalias: 
dmi:bvnAmericanMegatrendsInc.:bvr0403:bd05/19/2009:svnSystemmanufacturer:pnSystemProductName:pvrSystemVersion:rvnASUSTeKComputerINC.:rnP6TSE:rvrRev1.xx:cvnChassisManufacture:ct3:cvrChassisVersion:
  dmi.product.name: System Product Name
  dmi.product.version: System Version
  dmi.sys.vendor: System manufacturer

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/hplip/+bug/1568996/+subscriptions

-- 
Mailing list: https://launchpad.net/~desktop-packages
Post to     : desktop-packages@lists.launchpad.net
Unsubscribe : https://launchpad.net/~desktop-packages
More help   : https://help.launchpad.net/ListHelp

Reply via email to