It turns out that the problem is not with the hardware margins in the printer; the page definitions in the ppd file had set a printable area with 0.5" and 0.25" margins for a letter page.
To fix this, edit the ppd for the printer (/etc/cups/ppd/yourprintername.ppd
):
Find the list of *ImageableArea
definitions of page sizes:
*DefaultImageableArea: Letter
*ImageableArea Letter/US Letter: "18 36 594 756"
*ImageableArea A4/A4: "18 36 577 806"
*ImageableArea 11x17/11x17: "18 36 774 1188"
*ImageableArea A3/A3: "18 36 824 1155"
*ImageableArea A5/A5: "18 36 403 559"
*ImageableArea B5/B5 (JIS): "18 36 498 693"
*ImageableArea Env10/Envelope #10: "18 36 279 648"
*ImageableArea EnvC5/Envelope C5: "18 36 441 613"
*ImageableArea EnvDL/Envelope DL: "18 36 294 588"
*ImageableArea EnvISOB5/Envelope B5: "18 36 481 673"
*ImageableArea EnvMonarch/Envelope Monarch: "18 36 261 504"
*ImageableArea Executive/Executive: "18 36 504 720"
*ImageableArea Legal/US Legal: "18 36 594 972"
Find the paper size you want to modify the margins for and change the definition (the part in quotes) to match your printer's actual print margins:
Format: "<bottom-left x> <bottom-left y> <top-right x> <top-right y>"
Margin + printable area must remain constant
For me 72 units = one inch (so 0.1" is approximately 8 units)
So:
*ImageableArea Letter/US Letter: "8 8 604 784"
gives the desired 0.1" margin on the print area
4
Note that the format is actually "<bottom-left x> <bottom-left y> <top-right x> <top-right y>". See PostScript Printer Description File Format Specification.
– Derek Veit – 2018-07-25T18:49:52.723This actually helped to solve another problem I had that one type of paper and also an envelope size we use in my country not being present in these definitions. I usually had to do "magic" by using a large available standard and arranging the file to be printed to use the available area - I had many 'try-catch' moments to be able to centralize everything accordingly. Now it is easier to edit and save this *.ppd file. Sweet and happy random findings in Super User! :) – José – 2019-01-22T17:36:56.350
This hint is really helpful, helping us to print full screen 5'' photo out of a cups printer successfully without the margin. The command line we used is: lpr -P <Your_InkJet> -o media=3.5x5.Fullbleed <path-to-your-image> – tedyyu – 2019-03-20T14:24:09.533