We help IT Professionals succeed at work.

Change Font Size in CUPS from command line

kminfotech
kminfotech asked
on
9,493 Views
Last Modified: 2013-12-03
We are migrating a legacy app from SCO UNIX 5.05 to RHEL 4.  The SCO box dumped text reports to a printer (printer1).  The RHEL box dumps the same text reports to the same printer (printer1); however, the printout looks different.  Our LAN users (Lusers) are complaining because the old print style is "better".

The font is the same (courier).  The CPI is the same 16.7.  The LPI is the same (6 LPI).  The difference is the SCO BOX looks like 8 pt Courier and the RHEL box looks like 10 pt Courier.

How can I pass to CUPS to use 8pt courier?  I imagine a solution like this

lp -dprinter1 -o someoptionhere filename

where the someoptionhere would be -o usefontpoint=8 or whatever...

Thanks!
Comment
Watch Question

CERTIFIED EXPERT

Commented:
From TFM (http://www.cups.org/doc-1.1/sum.html)

...

Text Options

The following options apply when printing text files.
Setting the Number of Characters Per Inch

The -o cpi=value option sets the number of characters per inch:

lp -o cpi=10 filename ENTER
lp -o cpi=12 filename ENTER
lpr -o cpi=17 filename ENTER

The default characters per inch is 10.
Setting the Number of Lines Per Inch

The -o lpi=value option sets the number of lines per inch:

lp -o lpi=6 filename ENTER
lpr -o lpi=8 filename ENTER

The default lines per inch is 6.
Setting the Number of Columns

The -o columns=value option sets the number of text columns:

lp -o columns=2 filename ENTER
lpr -o columns=3 filename ENTER

The default number of columns is 1.
Setting the Page Margins

Normally the page margins are set to the hard limits of the printer. Use the -o page-left=value, -o page-right=value , -o page-top=value, and -o page-bottom=value options to adjust the page margins:

lp -o page-left=value filename ENTER
lp -o page-right=value filename ENTER
lp -o page-top=value filename ENTER
lp -o page-bottom=value filename ENTER
lpr -o page-bottom=value filename ENTER

The value argument is the margin in points; each point is 1/72 inch or 0.35mm.

Author

Commented:
This did not answer my question.  In fact, you repeated a lot of the information I posed in the question.

The question is this:

How to I print in a particular pt size font?  For example, I can print in 4 pt arial or 20 pt arial in Windows, how do I do this from the CUPS command line.

Changing cpi from 10 to 17 does NOT change the point size of the font.
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.