We just updated our server from CentOS 6 to RHEL 7 and after setting up our HP LaserJet 600 from ppd, I'm noticing that all print jobs now have about a 2" margin at the top of the page.

Is it possible to define margins in a configuration file? This reply suggests that margins can be set with some arguments to lpr, but I'd rather store them in a conf file.

using lp: 

-o page-bottom=N

-o page-left=N

-o page-right=N

-o page-top=N

Sets the page margins when printing text files. 
The values are in points - there are 72 points to the inch.
  • Have you looked at the loptions command? – Stephen Harris Jul 28 '16 at 17:00
  • I haven't, though I see it is spelled lpoptions – a coder Jul 28 '16 at 17:10
  • Oop, sorry, yeah, typo. lpoptions allows you to set per-user or global defaults for each printer. – Stephen Harris Jul 28 '16 at 17:27
  • Are the changes persistent? – a coder Jul 28 '16 at 17:28
  • 1
    Yup! They update config files /etc/cups/lpoptions or ~/.cups/lpoptions – Stephen Harris Jul 28 '16 at 17:29

Standard options can be set with the lpoptions command.

If run as a normal user the file $HOME/.cups/lpoptions is set.

If run as the root user then the system defaults /etc/cups/lpoptions is set.

This can be used to change various settings (eg double sided printing) and page-top.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.