Comment 7 for bug 1069507

Revision history for this message
TJ (tj) wrote :

Using the debugging instructions from

https://wiki.ubuntu.com/DebuggingPrintingProblems#Capturing_print_job_data

I captured the job whilst using the hpcups driver. The spooled file was PDF format. Evince (the PDF viewer) showed that the data in the spool file has an identical top-margin to the original document (probably because the PDF is passed through untouched).

However, after experimenting with changes to HWMargin and HPMechOffset in /etc/cups/ppd/DESKJET-995C.ppd on a hunch I tried printing to a different page size.

Instead of Print > Page Setup > Paper size: "A4" I used "A4 Small Margins 210x297mm". This printed the top margin precisely as expected.

For all my tests I've had Print > Page Handling > Page Scaling: "Fit to Printable Area" selected with "Auto Rotate and Centre" and "Select page size using document page size" disabled (not selected).

The difference according to the PPD file is in the page and printable area definitions:

*PageSize A4/A4 210x297mm: "<</cupsInteger0 26/PageSize[595 833]/ImagingBBox null>>setpagedevice"
*PageRegion A4/A4 210x297mm: "<</cupsInteger0 26/PageSize[595 833]/ImagingBBox null>>setpagedevice"
*ImageableArea A4/A4 210x297mm: "18 27 577 797"
*PaperDimension A4/A4 210x297mm: "595 833"

*PageSize A4.SM/A4 Small Margins 210x297mm: "<</cupsInteger0 26/PageSize[595.44 841.68]/ImagingBBox null>>setpagedevice"
*PageRegion A4.SM/A4 Small Margins 210x297mm: "<</cupsInteger0 26/PageSize[595.44 841.68]/ImagingBBox null>>setpagedevice"
*ImageableArea A4.SM/A4 Small Margins 210x297mm: "18 36 577.440002441406 832.679992675781"
*PaperDimension A4.SM/A4 Small Margins 210x297mm: "595.440002441406 841.679992675781"

That shows that "A4 Small Margins" dimensions are over-sized and "A4" are undersized. In particular the "A4" page length is 3.13mm short.

All dimensions are in points (72 points = 1 inch, 2.834... points = 1 millimetre). An A4 page measures 595.27559 x 841.889763 points.

ImageableArea values are: lower-left-x lower-left-y upper-right-x upper-right-y. Its coordinates are within the PaperDimension coordinate space.

According to other references [1] the A4 PageSize should be 595 x 842 (see table 10-4).

[1] http://docs.oracle.com/cd/E14571_01/bi.1111/b32121/pbr_uxprt004.htm