\input{gl2.slide-header-beamer}% \errorcontextlines=99% %% Subtopic Number = '1.107.3' %% Title from filename: 'Print files' %% Weight: 1 %% Description: %% Candidates should be able to manage print queues and %% manipulate print jobs. This objective includes adding and removing jobs %% from configured printer queues and converting text files to postscript %% for printing. %% Key files, terms, and utilities include: %% lpr %% lpq %% mpage \title{1.107.3\\Print files\\Weight 1}% \author[Andrew Eager]{Andrew Eager \texttt{andrew.eager@aes-pl.com.au} \and Geoff Robertson \texttt{} \and Nick Urbanik \texttt{} \\ {\tiny This document Licensed under GPL---see section~\ref{sec:license}}}% \subtitle{Linux Professional Institute Certification --- 102}% \mode
{\chead{1.107.3}}% \begin{document} \maketitle \mode
{\thispagestyle{empty}} \begin{frame} \mode {% \frametitle{Outline} %\footnotesize \begin{multicols}{2} \tableofcontents \end{multicols} % You might wish to add the option [pausesections] }% %\mode
%{% % \tableofcontents %}% \end{frame} \section{Context} \label{sec:context} \begin{frame} \frametitle{Topic 107 Printing [3]}% \framesubtitle{Where we are up to}% \begin{description} \item[1.107.2] Manage printers and print queues [1] % \uline depends on \usepackage[normalem]{ulem}: \item[1.107.3] \textbf{\uline{Print files [1]}} \item[1.107.4] Install and configure local and remote printers [1] \end{description} \end{frame} %------------------------------------------------------------------------------ %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> % \begin{frame}[fragile] % %================================================================ % \begin{center} \LARGE \textsf{-- General Linux 2 -- \\ % Print Files} \\[2mm] % \large \textsf{(Linux Professional Institute Certification)}\\[1mm] % \normalsize\end{center} % \footnote{Copyright \copyright\ 2002 Geoffrey Robertson. Permission is % granted to make and distribute verbatim copies or modified versions % of this document provided that this copyright notice and this % permission notice are preserved on all copies under the terms of the % GNU General Public License as published by the Free Software % Foundation---either version 2 of the License or (at your option) any % later version.} % \scriptsize % \begin{verbatim} % .~. Original presentation by Andrew Eager % /V\ geoffrey robertson % // \\ geoffrey@zip.com.au % @._.@ % \end{verbatim} % \tiny % \begin{verbatim} % $Id: gl2.107.3.slides.tex,v 1.4 2003/12/01 12:15:21 waratah Exp $ %$ % \end{verbatim} % \normalsize % \end{frame} %----------------------------------------------------------- %----10->|-----20->|-----30->|-----40->|-----50->|-----60->|-----70->|-----80-> %============================================================================== \section{Objective} \label{sec:objective} \begin{frame} \frametitle{Description of Objective}% \framesubtitle{1.107.3\ \ Print files}% \mode{\Large}% Candidates should be able to manage print queues and manipulate print jobs. This objective includes adding and removing jobs from configured printer queues and converting text files to postscript for printing. \end{frame} %============================================================================== \begin{frame}[fragile] % AE \frametitle{Key files, terms, and utilities include:}% \framesubtitle{1.107.3\ \ Print files}% \mode{\large}% \begin{description} \item[lpq] Display Print queue \item[lpr] Job submission \item[mpage] Print multiple pages per sheet \end{description} \end{frame} %----------------------------------------------------------- \section{Resources} \label{sec:resources} %============================================================================== \begin{frame} \frametitle{Resources of interest} \begin{description} \item[Printing-HOWTO] \item[Printing-Usage-HOWTO] \end{description} \end{frame} %----------------------------------------------------------- %============================================================================== %% \begin{frame}[fragile] %{} %ghr %%\end{frame} %-------------------------------------------------------- %============================================================================== \section{\texttt{lpr}} \label{sec:lpr} \begin{frame} \frametitle{\texttt{lpr} --- Submit job to Print Queue} \begin{itemize} \item \texttt{lpr} is used to submit a job to the print queue \item \texttt{lpr} can be run from the command line \item \texttt{lpr} assumes text is to be printed by default \item \texttt{lpr} uses \texttt{/etc/printcap} for printer settings \end{itemize} Usage of \texttt{lpr} is:\par \texttt{lpr [-P\meta{printer}] [-\#\meta{num}] \meta{filename} ...}% \par \textbf{Examples:} Print \texttt{/etc/hosts} file to spool \texttt{lp0}:% \par \cmd{lpr -Plp0 /etc/hosts} \par Print two copies of \texttt{/etc/hosts} file to default print spool:% \par \cmd{lpr -\#2 /etc/hosts} \end{frame} %----------------------------------------------------------- \section{\texttt{lpq}} \label{sec:lpq} \begin{frame} \frametitle{\texttt{lpq} --- See print jobs in queue} \begin{itemize} \item \texttt{lpq} displays the jobs in either the default printer queue, or a specified one \end{itemize} \end{frame} \begin{frame}[fragile] \frametitle{man lpq} \mode{\scriptsize} \begin{semiverbatim} lpq(1) Easy Software Products lpq(1) NAME lpq - show printer queue status SYNOPSIS lpq [ -E ] [ -P dest ] [ -a ] [ -l ] [ +interval ] DESCRIPTION lpq shows the current print queue status on the named printer. Jobs queued on the default destina- tion will be shown if no printer or class is speci- fied on the command-line. The interval option allows you to continuously report the jobs in the queue until the queue is empty; the list of jobs is show one every interval seconds. The -E option forces encryption when connecting to the server. The -a option reports jobs on all printers. The -l option requests a more verbose (long) reporting format. SEE ALSO cancel(1), lp(1), lpr(1), lprm(1), lpstat(1) CUPS Software Users Manual, http://local- host:631/documentation.html \end{semiverbatim} \end{frame} \section{\texttt{a2ps}} \label{sec:a2ps} %============================================================================== \begin{frame} \frametitle{\texttt{a2ps} --- Convert ASCII to Postscript} \begin{itemize} \item Most Unix sites use postscript printers \item You can not send an ASCII file directly to a postscript printer \item To convert from ASCII to ps, use \texttt{a2ps} \end{itemize} Usage: \texttt{a2ps [-o \textit{out-file}] in-file}\par Example:\par \cmd{a2ps -o myfile.ps myfile.txt}\par \cmd{cat myfile.ps > /dev/lp0} \end{frame} %----------------------------------------------------------- \section{\texttt{mpage}} \label{sec:mpage} %============================================================================== \begin{frame} \frametitle{\texttt{mpage} --- Print multiple pages per page} \begin{itemize} \item \texttt{mpage} will print multiple pages per physical page \item Input can be either text or postscript \item 1, 2, 4 or 8 pages can be printed per page \item Output can be directed to printer or stdout \end{itemize} Usage:\par \texttt{mpage [-1248] [options] input-file ...}\par \textbf{Example: Print 4 pages per page on A4}\par \cmd{mpage -4 -b A4 bigfile.ps | lpr} \end{frame} \mode {% \begin{frame} \frametitle{Topics Covered} %\footnotesize %\begin{multicols}{2} \tableofcontents[pausesections,pausesubsections] %\end{multicols} % You might wish to add the option [pausesections] \end{frame} } %============================================================================== \section{License Of This Document} \label{sec:license} \begin{frame} \frametitle{License Of This Document}% \raggedright% Copyright \copyright\ 2005, 2002 Andrew Eager , Nick Urbanik , Geoffrey Robertson % \par% You can redistribute modified or unmodified copies of this document provided that this copyright notice and this permission notice are preserved on all copies under the terms of the GNU General Public License as published by the Free Software Foundation --- either version 2 of the License or (at your option) any later version. \end{frame} \end{document}