[1406] | 1 | <!-- $Id$ --> |
---|
| 2 | |
---|
| 3 | <chapter> |
---|
| 4 | <title>Manage printers with pkprinters</title> |
---|
| 5 | <para>Last modified on $Date$</para> |
---|
[3413] | 6 | |
---|
[1406] | 7 | <para> |
---|
[3413] | 8 | <command>pkprinters</command> is the preferred tool to manage printers in <application>PyKota</application>. |
---|
[1406] | 9 | It only manages printers, and do it well. With it you can add or delete printers or printer groups, or modify |
---|
| 10 | existing printers or printers groups. This is also the tool to use to put printers into one or more printers groups. |
---|
[3413] | 11 | </para> |
---|
| 12 | |
---|
[2235] | 13 | <para> |
---|
[3413] | 14 | The very first thing you have to do once <application>PyKota</application> is installed but before it can work, |
---|
[2235] | 15 | is to add into <application>PyKota</application>'s database an entry for each of the print queues on |
---|
| 16 | which you want to have print quota or accounting. |
---|
[2551] | 17 | Although the <command>pkturnkey</command> command can be used to initialize your database and import |
---|
| 18 | printers into it, the <command>pkprinters</command> command offers additionnal functionnalities |
---|
[2550] | 19 | like full management of printers. |
---|
[2235] | 20 | </para> |
---|
[3413] | 21 | |
---|
[2235] | 22 | <para> |
---|
| 23 | Let's say your printing system has several print queues defined : <literal>HP2100</literal>, <literal>TekTro</literal>, |
---|
| 24 | and <literal>StylusColor1</literal> and <literal>StylusColor2</literal>. You want to charge 5 cents per page on each of this print queues. |
---|
| 25 | You just have to type : |
---|
[3413] | 26 | <screen> |
---|
[2235] | 27 | $ pkprinters --add --charge 0.05 HP2100 TekTro StylusColor1 StylusColor2 |
---|
| 28 | </screen> |
---|
| 29 | <warning><title>Warning</title> |
---|
| 30 | <para>Printers' names in PyKota are case-sensitive, so be careful to use the exact names |
---|
| 31 | exposed by your printing system. |
---|
| 32 | </para> |
---|
| 33 | </warning> |
---|
| 34 | </para> |
---|
[3413] | 35 | |
---|
[2235] | 36 | <para> |
---|
[3413] | 37 | After some minutes, you think that you should charge more on the <literal>StylusColor1</literal> |
---|
| 38 | and <literal>StylusColor2</literal> because they can do color. |
---|
[2235] | 39 | You also want to enter a description for these printers, because you have several |
---|
| 40 | of them : |
---|
[3413] | 41 | <screen> |
---|
[2235] | 42 | $ pkprinters --charge 0.25 "StylusColor*" |
---|
| 43 | $ pkprinters --description "Stylus Color 900 First floor" StylusColor1 |
---|
| 44 | $ pkprinters --description "Stylus Color 900 Second floor" StylusColor2 |
---|
| 45 | </screen> |
---|
| 46 | </para> |
---|
[3413] | 47 | |
---|
[2235] | 48 | <para> |
---|
| 49 | You can now verify what you did : |
---|
[3413] | 50 | <screen> |
---|
[2235] | 51 | $ pkprinters --list |
---|
| 52 | HP2100 [] (0.0 + #*0.05) |
---|
| 53 | TekTro [] (0.0 + #*0.05) |
---|
| 54 | StylusColor1 [Stylus Color 900 First floor] (0.0 + #*0.25) |
---|
| 55 | StylusColor2 [Stylus Color 900 Second floor] (0.0 + #*0.25) |
---|
| 56 | </screen> |
---|
| 57 | </para> |
---|
[3413] | 58 | |
---|
[2235] | 59 | <para> |
---|
| 60 | The command above has listed all print queues present in <application>PyKota</application>'s database, |
---|
[3413] | 61 | along with their optional description and their base cost formula. |
---|
[2235] | 62 | The cost formula includes the price per job, <literal>0.0</literal> in our examples, |
---|
| 63 | and the price per page (<literal>#</literal> representing the number of pages). |
---|
| 64 | </para> |
---|
[3413] | 65 | |
---|
[2235] | 66 | <para> |
---|
| 67 | If you defined printers groups, then the total cost is computed as the recursive |
---|
| 68 | sum of the printing cost on the current printer plus all the printers groups it |
---|
| 69 | is a member of. In addition, each user can have an overcharging (or undercharging) |
---|
| 70 | factor, by which the total printing cost will be multiplied to determine the real |
---|
| 71 | cost of printing on a particular printer for a particular user. |
---|
| 72 | </para> |
---|
[3413] | 73 | |
---|
[1406] | 74 | <sect1> |
---|
| 75 | <title>Reference</title> |
---|
| 76 | <para> |
---|
| 77 | <cmdsynopsis> |
---|
| 78 | <command>pkprinters</command> |
---|
| 79 | <group choice="opt"><arg>-v</arg><arg>--version</arg></group> |
---|
| 80 | <group choice="opt"><arg>-h</arg><arg>--help</arg></group> |
---|
| 81 | <group choice="opt"><arg>-a</arg><arg>--add</arg></group> |
---|
| 82 | <group choice="opt"><arg>-d</arg><arg>--delete</arg></group> |
---|
[2115] | 83 | <group choice="opt"> |
---|
| 84 | <arg>-D <replaceable>desc</replaceable></arg> |
---|
| 85 | <arg>--description <replaceable>desc</replaceable></arg> |
---|
| 86 | </group> |
---|
[1406] | 87 | <group choice="opt"><arg>-r</arg><arg>--remove</arg></group> |
---|
| 88 | <group choice="opt"> |
---|
| 89 | <arg>-c <replaceable>p</replaceable>,<replaceable>j</replaceable></arg> |
---|
| 90 | <arg>--charge <replaceable>p</replaceable>,<replaceable>j</replaceable></arg> |
---|
[3413] | 91 | </group> |
---|
[1406] | 92 | <group choice="opt"> |
---|
| 93 | <arg>-g <replaceable>pgroup1</replaceable>,<replaceable>pgroup2</replaceable>,<replaceable>...</replaceable></arg> |
---|
| 94 | <arg>--groups <replaceable>pgroup1</replaceable>,<replaceable>pgroup2</replaceable>,<replaceable>...</replaceable></arg> |
---|
[3413] | 95 | </group> |
---|
[2115] | 96 | <group choice="opt"><arg>-l</arg><arg>--list</arg></group> |
---|
| 97 | <group choice="opt"><arg>-r</arg><arg>--remove</arg></group> |
---|
| 98 | <group choice="opt"><arg>-s</arg><arg>--skipexisting</arg></group> |
---|
[2550] | 99 | <group choice="opt"> |
---|
| 100 | <arg>-m <replaceable>s</replaceable></arg> |
---|
| 101 | <arg>--maxjobsize <replaceable>s</replaceable></arg> |
---|
[3413] | 102 | </group> |
---|
[2550] | 103 | <group choice="opt"><arg>-p</arg><arg>--passthrough</arg></group> |
---|
| 104 | <group choice="opt"><arg>-n</arg><arg>--nopassthrough</arg></group> |
---|
[1406] | 105 | </cmdsynopsis> |
---|
| 106 | </para> |
---|
| 107 | </sect1> |
---|
| 108 | </chapter> |
---|
| 109 | |
---|