summaryrefslogtreecommitdiff
path: root/docs/docbook/smbdotconf/printing/printcommand.xml
diff options
context:
space:
mode:
Diffstat (limited to 'docs/docbook/smbdotconf/printing/printcommand.xml')
-rw-r--r--docs/docbook/smbdotconf/printing/printcommand.xml137
1 files changed, 70 insertions, 67 deletions
diff --git a/docs/docbook/smbdotconf/printing/printcommand.xml b/docs/docbook/smbdotconf/printing/printcommand.xml
index c996ed6c2e..5444309053 100644
--- a/docs/docbook/smbdotconf/printing/printcommand.xml
+++ b/docs/docbook/smbdotconf/printing/printcommand.xml
@@ -1,86 +1,89 @@
-<samba:parameter xmlns:samba="http://samba.org/common">
- <term><anchor id="PRINTCOMMAND"/>print command (S)</term>
- <listitem><para>After a print job has finished spooling to
- a service, this command will be used via a <command moreinfo="none">system()</command>
- call to process the spool file. Typically the command specified will
- submit the spool file to the host's printing subsystem, but there
- is no requirement that this be the case. The server will not remove
- the spool file, so whatever command you specify should remove the
- spool file when it has been processed, otherwise you will need to
- manually remove old spool files.</para>
+<samba:parameter name="print command"
+ context="S"
+ print="1"
+ xmlns:samba="http://samba.org/common">
+<listitem>
+ <para>After a print job has finished spooling to
+ a service, this command will be used via a <command moreinfo="none">system()</command>
+ call to process the spool file. Typically the command specified will
+ submit the spool file to the host's printing subsystem, but there
+ is no requirement that this be the case. The server will not remove
+ the spool file, so whatever command you specify should remove the
+ spool file when it has been processed, otherwise you will need to
+ manually remove old spool files.</para>
- <para>The print command is simply a text string. It will be used
- verbatim after macro substitutions have been made:</para>
+ <para>The print command is simply a text string. It will be used
+ verbatim after macro substitutions have been made:</para>
- <para>s, %p - the path to the spool
- file name</para>
+ <para>%s, %p - the path to the spool
+ file name</para>
- <para>%p - the appropriate printer
- name</para>
+ <para>%p - the appropriate printer
+ name</para>
- <para>%J - the job
- name as transmitted by the client.</para>
+ <para>%J - the job
+ name as transmitted by the client.</para>
- <para>%c - The number of printed pages
- of the spooled job (if known).</para>
+ <para>%c - The number of printed pages
+ of the spooled job (if known).</para>
- <para>%z - the size of the spooled
- print job (in bytes)</para>
+ <para>%z - the size of the spooled
+ print job (in bytes)</para>
- <para>The print command <emphasis>MUST</emphasis> contain at least
- one occurrence of <parameter moreinfo="none">%s</parameter> or <parameter moreinfo="none">%f
- </parameter> - the <parameter moreinfo="none">%p</parameter> is optional. At the time
- a job is submitted, if no printer name is supplied the <parameter moreinfo="none">%p
- </parameter> will be silently removed from the printer command.</para>
+ <para>The print command <emphasis>MUST</emphasis> contain at least
+ one occurrence of <parameter moreinfo="none">%s</parameter> or <parameter moreinfo="none">%f
+ </parameter> - the <parameter moreinfo="none">%p</parameter> is optional. At the time
+ a job is submitted, if no printer name is supplied the <parameter moreinfo="none">%p
+ </parameter> will be silently removed from the printer command.</para>
- <para>If specified in the [global] section, the print command given
- will be used for any printable service that does not have its own
- print command specified.</para>
+ <para>If specified in the [global] section, the print command given
+ will be used for any printable service that does not have its own
+ print command specified.</para>
- <para>If there is neither a specified print command for a
- printable service nor a global print command, spool files will
- be created but not processed and (most importantly) not removed.</para>
+ <para>If there is neither a specified print command for a
+ printable service nor a global print command, spool files will
+ be created but not processed and (most importantly) not removed.</para>
- <para>Note that printing may fail on some UNIXes from the
- <constant>nobody</constant> account. If this happens then create
- an alternative guest account that can print and set the <link linkend="GUESTACCOUNT"><parameter moreinfo="none">guest account</parameter></link>
- in the [global] section.</para>
+ <para>Note that printing may fail on some UNIXes from the
+ <constant>nobody</constant> account. If this happens then create
+ an alternative guest account that can print and set the <link linkend="GUESTACCOUNT">
+ <parameter moreinfo="none">guest account</parameter></link>
+ in the [global] section.</para>
- <para>You can form quite complex print commands by realizing
- that they are just passed to a shell. For example the following
- will log a print job, print the file, then remove it. Note that
- ';' is the usual separator for command in shell scripts.</para>
+ <para>You can form quite complex print commands by realizing
+ that they are just passed to a shell. For example the following
+ will log a print job, print the file, then remove it. Note that
+ ';' is the usual separator for command in shell scripts.</para>
- <para><command moreinfo="none">print command = echo Printing %s &gt;&gt;
- /tmp/print.log; lpr -P %p %s; rm %s</command></para>
+ <para><command moreinfo="none">print command = echo Printing %s &gt;&gt;
+ /tmp/print.log; lpr -P %p %s; rm %s</command></para>
- <para>You may have to vary this command considerably depending
- on how you normally print files on your system. The default for
- the parameter varies depending on the setting of the <link linkend="PRINTING">
- <parameter moreinfo="none">printing</parameter></link> parameter.</para>
+ <para>You may have to vary this command considerably depending
+ on how you normally print files on your system. The default for
+ the parameter varies depending on the setting of the <link linkend="PRINTING">
+ <parameter moreinfo="none">printing</parameter></link> parameter.</para>
- <para>Default: For <command moreinfo="none">printing = BSD, AIX, QNX, LPRNG
- or PLP :</command></para>
- <para><command moreinfo="none">print command = lpr -r -P%p %s</command></para>
+ <para>Default: For <command moreinfo="none">printing = BSD, AIX, QNX, LPRNG
+ or PLP :</command></para>
+ <para><command moreinfo="none">print command = lpr -r -P%p %s</command></para>
- <para>For <command moreinfo="none">printing = SYSV or HPUX :</command></para>
- <para><command moreinfo="none">print command = lp -c -d%p %s; rm %s</command></para>
+ <para>For <command moreinfo="none">printing = SYSV or HPUX :</command></para>
+ <para><command moreinfo="none">print command = lp -c -d%p %s; rm %s</command></para>
- <para>For <command moreinfo="none">printing = SOFTQ :</command></para>
- <para><command moreinfo="none">print command = lp -d%p -s %s; rm %s</command></para>
+ <para>For <command moreinfo="none">printing = SOFTQ :</command></para>
+ <para><command moreinfo="none">print command = lp -d%p -s %s; rm %s</command></para>
- <para>For printing = CUPS : If SAMBA is compiled against
- libcups, then <link linkend="PRINTING">printcap = cups</link>
- uses the CUPS API to
- submit jobs, etc. Otherwise it maps to the System V
- commands with the -oraw option for printing, i.e. it
- uses <command moreinfo="none">lp -c -d%p -oraw; rm %s</command>.
- With <command moreinfo="none">printing = cups</command>,
- and if SAMBA is compiled against libcups, any manually
- set print command will be ignored.</para>
+ <para>For printing = CUPS : If SAMBA is compiled against
+ libcups, then <link linkend="PRINTING">printcap = cups</link>
+ uses the CUPS API to
+ submit jobs, etc. Otherwise it maps to the System V
+ commands with the -oraw option for printing, i.e. it
+ uses <command moreinfo="none">lp -c -d%p -oraw; rm %s</command>.
+ With <command moreinfo="none">printing = cups</command>,
+ and if SAMBA is compiled against libcups, any manually
+ set print command will be ignored.</para>
- <para>Example: <command moreinfo="none">print command = /usr/local/samba/bin/myprintscript
- %p %s</command></para>
- </listitem>
- </samba:parameter>
+ <para>Example: <command moreinfo="none">print command = /usr/local/samba/bin/myprintscript %p %s</command></para>
+</listitem>
+</samba:parameter>