     Linux, HOWTO
  by Mark Komarinski <markk@auratek.com>,  Alex Ott
  ott@phtd.tpu.edu.ru
  v1.2.2, 6 February 1998
  ____________________________________________________________

  Table of Contents


  1. 

     1.1  Linux Printing HOWTO
     1.2  
     1.3     
     1.4 |  the Linux Printing HOWTOs
     1.5  
     1.6 

  2.   Linux

     2.1  Linux Printing
     2.2   
     2.3     
     2.4      
     2.5   lpd  
     2.6  printtool  RedHat

  3.  

     3.1   
     3.2  PostScript 
     3.3  PDF-
     3.4   TeX
     3.5    
     3.6  

  4.  

     4.1   
     4.2   PRINTER

  5.      FAQ

  6.  

  7. 



  ______________________________________________________________________

   ::      , 
  .


  11..  

         
        Linux.   
   supplementary   Linux Printing Setup HOWTO,
         Linux.
          
        BSD   
    Linux.


  11..11..   LLiinnuuxx PPrriinnttiinngg HHOOWWTTOO

    Mark Komarinski <markk@auratek.com>:

     Matt Foster     
   .    ,  ,  
      .

    <mwf@engr.uark.edu>:

     Linux Printing HOWTO    ,
   Grant Taylor <grant@god.tufts.edu>  Brian McCauley
  <B.A.McCauley@bham.ac.uk>.     
      Grant' and Brian',   
        . 
  ,          .
    ,     .


  11..22..   

  v1.2.2

    ,      
     RedHat.  Ed!

     v1.2.1

    ,    Dr. Linux publication

     v1.2

    Windows 

        

     v1.11

     !

       lpc

        

      !

  v1.1

      

       PostScript-

          8-)

    fleshed the     Linux

  v1.0

       Printing Usage HOWTO


  11..33..      

           /
      / .   
        .
  _(_c_) _1_9_9_5 _M_a_t_t _F_o_s_t_e_r _(_m_w_f_@_e_n_g_r_._u_a_r_k_._e_d_u_)
  _(_c_) _1_9_9_6_-_1_9_9_7 _M_a_r_k _F_. _K_o_m_a_r_i_n_s_k_i _(_m_a_r_k_k_@_a_u_r_a_t_e_k_._c_o_m_)


   ,      
    Linux HOWTO      
   .

             
       . 
         
  ;      Linux HOWTO
     .

         
    .       
  HOWTO ,        
     HOWTO.


     ,    Tim Bynum,
   Linux HOWTO,   <linux-howto@sunsite.unc.edu>. 
           
    .


  11..44..  ||  tthhee LLiinnuuxx PPrriinnttiinngg HHOOWWTTOOss

   ,        , 
   PostScript .      
     .    PostScript    
     Linux (  SunSITE
  <ftp://sunsite.unc.edu/pub/Linux/docs/HOWTO/>).


  11..55..   

  ,        
    <markk@auratek.com>.


  11..66..  

    ,         
         
   --       
     .

     thank Matt Foster,   
   .


  22..    LLiinnuuxx

        ,  
  ,    ,      
     .


  22..11..   LLiinnuuxx PPrriinnttiinngg

    Linux -- _l_p  --    
       BSD  
   UNIX.


  22..22..     llpprr

          Linux 
         .   
      _c_a_t.    root, 
  -  



       # cat thesis.txt > /dev/lp




    , /dev/lp     
   --       , typesetter,
   .  (.  _l_n(1)      
  )

    ,   root     
           .  
     _l_p_r, _l_p_r_m, and _l_p_q    
   .


      _l_p_r   .
   _l_p_r         
    ,      , _l_p_d,
    .       
    .

     _l_p_r,      
     (spool directory),    
  _l_p_d  .   _l_p_d  ,     , 
      (   forking).
             
       .  
        .


   _l_p_r(1)  ,



       $ lpr [  ] [ _ ... ]




   _  , _l_p_r     
  expects ( ,    ). 
         .
   ,



       $ cat thesis.txt | lpr




  ,




  $ pr -l60 thesis.txt | lpr




   _l_p_r      
      .   
    : -PPprinter   
  , -hh suppresses printing of the burst page, -ss 
         
  (   ),  -##num   
  .     _l_p_r    



       $ lpr -#2 -sP dj thesis.txt




         thesis.txt 
       _d_j,    
    _l_p_d.       
  thesis.txt.

     ,    _l_p_r,  
   _l_p_r(1).


  22..33..       llppqq

         _l_p_q.
     ,    
     .

    _l_p_q      .



       $ lpq
       lp is ready and printing
       Rank   Owner      Job  Files                            Total Size
       active mwf        31   thesis.txt                       682048 bytes





  22..44..        llpprrmm

          
  ,       .   
     _l_p_r_m.



       $ lprm -




          
      .    
    ,      
    _l_p_q       _l_p_r_m.
  ,
       $ lprm 31




     31 (thesis.txt)    .


  22..55..    llppdd   llppcc

   _l_p_c(8)    , 
    lpd.      
      ,  
   ,        
  . Lpc     ,  
      .



       $ lpc




       lpc.  , 
           .
        lpc   .



       $ lpc status all




         
   _l_p_d,      ,  
   .     _o_p_t_i_o_n   
    (lp, print, etc)    all, 
    .


    disable _o_p_t_i_o_n -       

    down _o_p_t_i_o_n -     

    enable _o_p_t_i_o_n -       

    quit (or exit) -  lpc

    restart _o_p_t_i_o_n -  lpd   

    status _o_p_t_i_o_n -   

    up _o_p_t_i_o_n -       lpd


  22..66..   pprriinnttttooooll  RReeddHHaatt

     here on RedHat's amazing printtool program.

     ,    magicfilter.  RedHat 
       .  
      HP LJ 4L,    ,
   RedHat 4.0 (       
  RH).
      root   printtool (   
     su,     SETENV DISPLAY :0.0  xhost +).

      "Add" (""),    "OK"  
     .

         ( /dev/lp1)

        -   , 
        (ljet4, 300x300  letter   )

     "OK",   lpd.

         /etc/printcap ,  
           
     .     ,   ..


  33..   

         ,   
      Linux.


  33..11..    

           
           .
            
   .      -- , 
     Epson-   IBM ProPrinter, 
       PostScript,  
    Ghostscript (.  ) 
   .

      ,      
     PCL.     . 
        PCL.   ,  
   _N_e_t_P_B_M   PCL.    --
   ghostscript (.  ).

     --    NetPBM 
  Ghostscript,       
  .


  33..22..   PPoossttSSccrriipptt 

   PostScript   ,   
  PostScript'  ;  _l_p_r,    
    .  ,      
  PostScript,     .   , 
  ,     PostScript,    
  ,     .  
     Ghostscript.

    Ghostscript'    
   PostScript-  ,   .  
  PostScript-  Ghostscript,    -
   



       $ gs -dSAFER -dNOPAUSE -sDEVICE=deskjet -sOutputFile=\|lpr thesis.ps


  ,       
  Ghostscript   _l_p_r   -ssOOuuttppuuttFFiillee.


  Ghostview --    Ghostscript   X Window.  
    PostScript-     .
  Ghostview  Ghostscript     
  <ftp://prep.ai.mit.edu/pub/gnu/>.


  33..33..   PPDDFF--

   Adobe  Acrobat reader  Linux,    
     Adobe  <http://www.adobe.com>.  
   , xpdf,  .     
  postscript .


  33..44..    TTeeXX

         TeX --    
  PostScript      Ghostscript.   , 
       TeX-  
    DVI (    ). 
      _t_e_x(1)  _l_a_t_e_x(1).   
   DVI-  PostScript-   _d_v_i_p_s.
         .



       $ tex thesis.tex
       $ dvips thesis.dvi




        PostScript-  
  .


  33..55..      ttrrooffff




       $ groff -Tascii thesis.tr | lpr




   ,   ,



       $ groff thesis.tr > thesis.ps




     PostScript-   .


  33..66..    mmaann



       $ man man | col -b | lpr




   man     troff
  data,       ,  
  .  'col'   ,   
     man    more.


  44..   

        


  44..11..    

     ASCII-    , 
    -       .
           
  .   ,    
     .       --
    ,   _p_r.



       $ pr +4 -d -h"Ph.D. Thesis, 2nd Draft" -l60 thesis.txt | lpr




    , _p_r    thesis.txt   
   (+4),     60  (-l60),  
    (-d),    "Ph.D. Thesis, 2nd Draft" 
     (-h).  _L_p_r     
    _p_r.       
     _p_r.


  44..22..    PPRRIINNTTEERR

       Linux   -PP.   
         .
        ,  
     .

         , 
      PRINTER   
  ,    .     
     .   _b_a_s_h   
    



       $ PRINTER="printer_name"; export PRINTER




    _c_s_h,   



       % setenv PRINTER "printer_name"

            (.profile 
  _b_a_s_h,  .cshrc  _c_s_h),     .
  ( _b_a_s_h(1)  _c_s_h(1)      ).


  55..       FFAAQQ


  1.       ?

  1.     -  
    .    , 
     /  (
  DOS)   ,    UNIX.  
        --     
       --  
  DIP-,     
    .     , 
     (2)

    --     . 
     .



       $ cat thesis.txt | todos | lpr





  2.    ?

  2.   --  ,     
  (_s_t_d_i_n),      ,   
    (_s_t_d_o_u_t).      ,
    .


  3.    _m_a_g_i_c ?

  3.  magic  --      
     . ,   --  
   ,      ,  
  .   --  PostScript-,    ,
         (ghostscript).  
      magicfilter  APSfilter. 
     --      
   .

     ,    ,  
       (  ghostscript -  
   ,        
  PostScript),          
   .     ,   
    :

    GhostScript

    TeX

    NetPBM

    jpeg utilities


    gzip


  4.    Windows.   Linux   ?

  4.  . ,     WPS 
      Linux.  ,   WPS  
   (  Canon BJC 610)  ,   
   -    WPS.  ,   
  HP DeskJet 820Cxi/Cse,     Linux.    ,
  Linux      (. Samba)   
  Win95,   Win95      


  5.      6     
     "file too large (  )".

  5.       /etc/printcap   
    .     1000  
  ( 500 ).   PostScript  ,    6-8
      . ,     
   .


       mx=0




     --     . 
      ,  lpr  
        .     
  -s  lpr  .


  66..   

       ,   
      .

      :

      ? (  ?)

    lpd ? (   lpc) ( ?)

    root   -   ? ( ?)

         DOS? (  /?)

            .

        <markk@auratek.com>.


  77..  

    --      Linux.  
         .
    ,     ,   
   .

          USENET,  :

      ?  ( _l_p_c(8)  ).

             HOWTO  ,
      Grant Taylor?

      ,      
     .         
   ,    . 
      : "    lpr, 
  ".      
  .       Linux,
    ,   ,    .


       

       _c_a_t(1)     

       _d_v_i_p_s(1)   TeX DVI-  PostScript

       _g_h_o_s_t_v_i_e_w(1)  PostScript  
        Ghostscript

       _g_r_o_f_f(1)       groff

       _g_s(1)  Ghostscript /

       _l_p_c(8)     

       _l_p_d(8)     

       _l_p_q(1)     

       _l_p_r(1)     

       _l_p_r_m(1)       

       _p_r(1)      

       _t_e_x(1)      


       UUSSEENNEETT

       comp.os.linux.*    Linux

       comp.unix.*       UNIX





















