Linux Commands Examples

A great documentation place for Linux commands

paperconf

print paper configuration information

Synopsis

paperconf [ [ -p ] paper | -d | -a ] [ -z ] [ -n | -N ] [ -s | -w | -h ] [ -c | -m | -i ]


add an example, a script, a trick and tips

: email address (won't be displayed)
: name

Step 2

Thanks for this example ! - It will be moderated and published shortly.

Feel free to post other examples
Oops ! There is a tiny cockup. A damn 404 cockup. Please contact the loosy team who maintains and develops this wonderful site by clicking in the mighty feedback button on the side of the page. Say what happened. Thanks!

examples

0
source
            
unset PAPERSIZE || true
: ${PAPERCONF:=/etc/papersize}
export PAPERCONF
unset PAPERDIR || true
: ${PAPERDIR:=/etc/libpaper.d}
esac
shift
done
invalidpaper() {
! paperconf "$1" 2>/dev/null 1>&2
}
format() {
0
source
            
pageSize="$(LC_ALL=C paperconf 2>/dev/null)" || size=a4
lpadmin -h localhost -p "${printer}" -v ${URI} -E -m ${PPD} -o printer-is-shared=no -o PageSize=${pageSize}

description

paperconf prints information about a given paper. The information that can be obtained is the name of the paper, its size and its width or height. When called without arguments, paperconf prints the name of the system- or user-specified paper, obtained by looking in order at the PAPERSIZE environment variable, at the contents of the file specified by the PAPERCONF environment variable, at the contents of /etc/papersize or by using letter as a fall-back value if none of the other alternatives are successful. By default, width and height of the paper are printed in PostScript points.

options

-p paper

Specify the name of the paper about which information is asked.

-d

Use the default builtin paper name.

-a

Consider all known paper names.

-z

If the paper name is unknown, print it but issue a message on the standard error and exit with a non-zero code.

-n

Print the name of the paper.

-N

Print the name of the paper with the first letter capitalized.

-s

Print the size (width followed by height) of the paper.

-w

Print the width of the paper.

-h

Print the height of the paper.

-c

Use centimetres as unit for paper size.

-m

Use millimetres as unit for paper size.

-i

Use inches as unit for paper size.

environment

files

/etc/papersize

Contains the name of the system-wide default paper size to be used if the PAPERSIZE and PAPERCONF variables are not set.

papersize

Paper size to use regardless of what the papersize file contains.


see also

papersize


author

Yves Arrouye <arrouye[:at:]debian[:dot:]org>

How can this site be more helpful to YOU ?


give  feedback