Since hpijs was dropped in favour of hpcups, I have a problem when printing. The basic problem is: when I print an A4 page from Libreoffice on my HP Officejet 6700 Premium printer (with cups and the hpcups driver for my printer model), AND I have an upper page margin which is set to less than 1,5 cm, everything which is beyond this margin isn't printed.
Note: this is NOT a hardware problem. I can print PDF's with very low margins (under 1,5 cm). And I can print without problems my A4 pages with Abiword. The problem only happens when I print with Libreoffice (or Openoffice).
Now: after a lot of searches I found out, watching at the cups logs (in debugging mode) that the problem could come from the fact that Libreoffice, when printing my A4 pages, seems to change the page format to A4.Duplex (though Duplex mode is disabled in the cups configuration for the printer). Indeed, I've read (here: https://bugs.launchpad.net/hplip/+bug/1352316) that page margin rules are different than standard rules for Duplex printing. Now: in the PPD file for the printer, I tried to delete all the A4.Duplex lines, and that "solves" the problem.
In the cups logs (/var/log/cups/error_log), here are some relevant lines when the problem happens:
D [28/Jun/2018:12:50:44 +0200] [Job 3155] argv="Duplex=None InputSlot=Tray1 PageSize=A4.Duplex job-uuid=urn:uuid:85bae156-3acd-3fd7-6141-240a734334ad job-originating-host-name=localhost date-time-at-creation= date-time-at-processing= time-at-creation=1530183044 time-at-processing=1530183044 document-name-supplied=DS9pHR"
D [28/Jun/2018:12:50:44 +0200] [Job 3155] Ghostscript command line: gs -dQUIET -dPARANOIDSAFER -dNOPAUSE -dBATCH -dNOINTERPOLATE -dNOMEDIAATTRS -dShowAcroForm -sstdout=%stderr -sOutputFile=%stdout -sDEVICE=cups -sMediaType=Plain -sOutputType=0 -r600x600 -dMediaPosition=1 -dDEVICEWIDTHPOINTS=595 -dDEVICEHEIGHTPOINTS=841 -dcupsBitsPerColor=8 -dcupsColorOrder=0 -dcupsColorSpace=17 -dcupsInteger0=26 -scupsPageSizeName=A4.Duplex -I/usr/share/cups/fonts -c \'<</.HWMargins[9.360000 33.192001 9.359985 42.552002] /Margins[0 0]>>setpagedevice\' -f -_
Please note the wrong PageSize and the reduced HWMargin.
Steps to Reproduce:
1. Have a A4 page ready to print
2. Print the page
Cups prints the A4 page with A4.Duplex pagesize and the upper page text (within 1,5 cm margin) isn't printed.
Cups should print a normal A4 page including the upper page text (within 1,5 cm margin).
User Profile Reset: Yes
Created attachment 143218 [details]
The PPD file for the printer
Created attachment 143219 [details]
/var/log/cups/error_log when printing fails
Some additional informations which I forgot.
1) My system runs under Archlinux (but I doubt this is OS specific).
2) If I print with a "Letter" format, the printing happens normally ("Letter" is not changed into "Letter.Duplex"). The problem only happens with A4. Maybee other formats also.
The investigation seems thorough enough that I will just set to NEW.