你如何让 os X 上的 lpr 以边距和较小的字体打印?

dan*_*dan 3 unix macos

打印文本文件lpr会产生带有大摩纳哥字体和非常薄的边距的输出。lpr在 OS X 上使用时,有没有办法更改字体和边距?

Dan*_*eck 5

lp允许您指定边距和文本大小。根据man lp

-o cpi=N
     Sets the number of characters per inch to use when printing a text file. The default is 10.

-o lpi=N
     Sets the number of lines per inch to use when printing a text file. The default is 6.

-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.

EXAMPLES

Print a double-sided legal document to a printer called "foo":
    lp -d foo -o media=legal -o sides=two-sided-long-edge filename

Print an image across 4 pages:
    lp -d bar -o scaling=200 filename

Print a text file with 12 characters per inch, 8 lines per inch, and a 1 inch left margin:
    lp -d bar -o cpi=12 -o lpi=8 -o page-left=72 filename
Run Code Online (Sandbox Code Playgroud)