








                      PPrriiMMaa -- AA PPrriinntteerr TTooooll ffoorr LLiinnuuxx//XX1111

                                  _J__r_g _R__d_l_e_r
                                   _A_p_r_i_l _1_9_9_7


          CCoonntteennttss

               1: Disclaimer
          2: What PriMa Is Not
          3: What PriMa Is
          4: How Does PriMa Work
          4.1: Traditional Systems
          4.2: Printing With PriMa
          5: Restrictions
          6: Requirements
          7: Where To Get PriMa
          8: Installation
          8.1: Install Statically Linked Binary
          8.2: Install PriMa From Sources
          9: Copyright
          10: TODO
          11: History
          12: Contributors
          13: Bye Bye



































                                       -2-


          11:: DDiissccllaaiimmeerr

               I  didnt  write or even speak english for a long time,
          maybe you should better learn german  and  read  the  german
          documentation. :-)

          If you dont use Postscript for printing (a postscript capa
          ble printer or ghostscript), you wont need PriMa!

          If somebody reports serious errors  or  suggests  changes  I
          will  try  to  find  the  time to improve PriMa. Please send
          bugreports,  suggestions  and   patches   to   jjoorraa@@jjooppss..iinn--
          bbeerrlliinn..ddee .

          This  documentation  was automatically generated by YYOODDLL and
          may not look perfect in all formats (HTML/Text/DVI/PS).




          22:: WWhhaatt PPrriiMMaa IIss NNoott

               PriMa is nnoott a replacement for:

          o    the lpr spool system (lpd, lpr, lpq etc.)

          o    a magicfilter for converting various file formats (mag
               icfilter by Peter Anvin)

          o    ghostscript and ghostview or gv

          o    the PSUtils by Angus J. C. Duggan

          o    a mail system

          o    a  fax  system  But  some  or all of them are needed or
               helpful to use PriMa!


          33:: WWhhaatt PPrriiMMaa IIss

               Some applications print a document only by calling  llpprr
          with some options and will not allow the user to control the
          process of possible conversion  and  transformation  of  the
          document.  If  you use PriMa it will give you the ability to
          manipulate  your  document  (change  papersize,  print  only
          selected  pages or ranges, print both-sided, rearrange pages
          etc.), to preview and to send your document to  a  file,  to
          printers,  to  mail  or  fax  systems or other programs. All
          manipulation is done by using the famous psutils by Angus J.
          C.  Duggan.  If  your  document  is not in postscript format
          PriMa supports conversion by a magicfilter.











                                       -3-


          PriMa can be called by your applications instead of  llpprr  or
          used standalone.


          44:: HHooww DDooeess PPrriiMMaa WWoorrkk


          First  I  want  to show the differences to traditional, well
          known lpr-systems.


          44..11:: TTrraaddiittiioonnaall SSyysstteemmss


          Printing with Linux in simple cases works like shown in  the
          figure.


          If  you  need  to  convert or manipulate the document before
          printing, you have to do it yourself or use  a  magicfilter,
          that  will  be  called  by llppdd and works out of reach of the
          user.

          If you want to choose between different options you have  to
          configure  a  set of logical printer devices (with different
          filters) for the lpr spool system.  Usually thats  ok,  but
          sometimes  you  want to change some options, preview, change
          again, preview again, print to a file, reject the print  job
          or  do  other things without wasting paper or typing lots of
          commands.

          Since the conversion will be done by the system in the spool
          area,  there  may  be some external files missing (e.g. EPS-
          figures in DVI-files). I know there are (more or less  work
          ing) solutions for this problem, but it is not very comfort
          able.


          44..22:: PPrriinnttiinngg WWiitthh PPrriiMMaa


          PriMa will allow you to convert and manipulate your document
          interactively  before  you send the job to the printing sys
          tem.  Theres no need for the llppdd daemon to change the docu
          ment (besides converting to postscript for non-ps-printers).

          Since the output channel of PriMa can be configured  by  the
          user,  PriMa is oonnee comfortable interface for printing, sav
          ing, faxing, mailing etc.

          You configure a set of _l_o_g_i_c_a_l _p_r_i_n_t_e_r_s within PriMas  con
          figuration file. Each line contains a name, a filter command
          (magicfilter) a printing command (lpr, mail, fax etc.) sepa
          rated by TTAABBs.









                                       -4-


          When you select printing or previewing from inside PriMa, it
          will use the filter command of the selected printer to  con
          vert your file to postscript, will pipe it through some pro
          grams of the psutils (depending on the options you  choosed)
          and  will then call the previewer or the printing command of
          the selected printer. This may be a call to lpr (llpprr --PPffoooo),
          direct  printing to the printer port (ccaatt ffiillee >>//ddeevv//llpp11) or
          call other programs that will ask  for  other  lpr-printers,
          for  a filename to save to, for a mailaddress or a faxnumber
          to send to, or (almost) anything you want.  There  are  some
          examples included (PPrriiMMaa--CCmmdd,, PPrriiMMaa--FFiillee,, PPrriiMMaa--MMaaiill,, PPrriiMMaa--
          FFaaxx aanndd PPrriiMMaa--llpprr) to show you how to configure an interface
          to other programs.


          55:: RReessttrriiccttiioonnss


          o    PriMa  is  not  able  to  analyse  or change postscript
               files, all manipulation is done by the  psutils.  PriMa
               will use the magicfilter for all files, even if already
               in postscript format.

          o    Not all of the functionality of  the  psutils  will  be
               used by PriMa.

          o    Not  all  combinations  of  the selectable options will
               work or will give useful results.

          o    Pagenumbers may not be correct. The manpage  for  psse
               lect  warns:  _T_h_e  _p_a_g_e _n_u_m_b_e_r _g_i_v_e_n _t_o _p_s_s_e_l_e_c_t _i_s _t_h_e
               _n_u_m_b_e_r _o_f _t_h_e _p_a_g_e _c_o_u_n_t_i_n_g _f_r_o_m _t_h_e _s_t_a_r_t  _o_r  _e_n_d  _o_f
               _t_h_e  _f_i_l_e_,  _s_t_a_r_t_i_n_g  _a_t _o_n_e_. _T_h_e _a_c_t_u_a_l _p_a_g_e _n_u_m_b_e_r _i_n
               _t_h_e _d_o_c_u_m_e_n_t _m_a_y _b_e _d_i_f_f_e_r_e_n_t_.

          o    The number of logical  printers  is  limited  (default:
               10).  If  you  need more entries you have to change the
               value of MMAAXX__PPRRIINNTTEERR in mmaaiinn..hh and recompile.

          o    Neither PriMa nor magicfilter are able to convert files
               standalone,  magicfilter  will just call the converting
               programs automatically in the right order. You need  to
               have converters for all file types installed (e.g. a2ps
               for ASCII, dvips for DVI, pbmtools for various pictures
               etc.)!

          o    ...


          66:: RReeqquuiirreemmeennttss

               To compile PriMa:











                                       -5-


          o    X11

          o    the xforms  library version not older than 0.86

          o    recommended: the  tooltips  library for xforms

          To use PriMa:

          o    the  psutils   by  Angus J. C. Duggan . BBeewwaarree:: version
               1.16 seems to cause problems under  Linux  (the  author
               says its a linux-bug!), do not use with PriMa!

          o    ghostview (or gv) and ghostscript

          o    highly  recommended: a _m_a_g_i_c_f_i_l_t_e_r, preferably a script
               for magicfilter by Peter Anvin.

          o    recommended: the lpr spool system

          o    recommended: a mail system and a fax system


          77:: WWhheerree TToo GGeett PPrriiMMaa




          Homepage:
               The homepage of  PriMa  is  located  at  hhttttpp::////wwwwww..iinn--
               bbeerrlliinn..ddee//UUsseerr//jjooppss//PPrriiMMaa//PPrriiMMaa..hhttmmll .


          Sources:
               PriMa can be downloaded from ssuunnssiittee..uunncc..eedduu. If it was
               not already copied  to  //ppuubb//LLiinnuuxx//ssyysstteemm//PPrriinnttiinngg  you
               may try //ppuubb//LLiinnuuxx//IInnccoommiinngg .



          88:: IInnssttaallllaattiioonn


          88..11:: IInnssttaallll SSttaattiiccaallllyy LLiinnkkeedd BBiinnaarryy

               Read next section but do the following:

          o    skip 44

          o    use  mmaakkee  tteesstt..ssttaattiicc or mmaakkee bbiiggtteesstt..ssttaattiicc when exe
               cuting 66

          o    use mmaakkee iinnssttaallll..ssttaattiicc instead of  mmaakkee  iinnssttaallll  when
               executing 77










                                       -6-


          88..22:: IInnssttaallll PPrriiMMaa FFrroomm SSoouurrcceess


          1.   Install the psutils, read the documentation

          2.   Install  a  magicfilter  (program  to  convert files to
               postscript). If you dont have or want to have  such  a
               program, PriMa will only work with postscript files.

          3.   Edit MMaakkeeffiillee

          4.   mmaakkee cclleeaann ;; mmaakkee aallll - watch out for errors, maybe you
               will have to change some lines in Makefile and run make
               again

          5.   Edit  pprriimmaa__pprriinntteerr  (you  may  skip  this  and use the
               internal  configuration  dialog  instead).  Every  line
               defines  one  logical  printer. Fields are separated by
               TTAABB. First field is the name,  second  the  magicfilter
               command.  %%IINNFFIILLEE  and  %%PPSSFFIILLEE will be replaced by the
               real filenames. If you dont want to use a magicfilter,
               use ccpp %%IINNFFIILLEE %%PPSSFFIILLEE instead. Third field is the com
               mand to  print  with  this  printer  (%%PPSSFFIILLEE  will  be
               replaced  by  the real filename). Look at the examples,
               the files ttoooollss//PPrriiMMaa--** (using  PPrriiMMaa..iinnppuutt)  may  work
               with little changes. pprriimmaa__pprriinntteerr will be installed as
               the global configuration file. You can change  it  any
               time  from  inside PriMa or use it as your userspecific
               configuration.

          6.   mmaakkee tteesstt or mmaakkee bbiiggtteesstt - test it!

          7.   mmaakkee iinnssttaallll - install PriMa if you like it

          8.   Change configuration of applications  that  should  now
               call  PPrriiMMaa instead of llpprr. For Emacs you may use ((sseettqq
               llpprr--ccoommmmaanndd ""PPrriiMMaa"")) in ~~//..eemmaaccss.  Other  programs  may
               need changes in source and recompiling.


          99:: CCooppyyrriigghhtt

               Copyright(c) 1996, 1997 by Joerg Raedler (jora@jops.in-
          berlin.de)

          PriMa is covered by the GGNNUU GGEENNEERRAALL PPUUBBLLIICC LLIICCEENNSSEE.  Look at
          the  file   LLIICCEENNSSEE  ,  if  you  really dont know what that
          means!


          1100:: TTOODDOO












                                       -7-


          o    lots of errorchecking and -correcting

          o    rewrite messages, dialogs and  tooltips  messages  (bad
               english)

          o    find  Linux  specific  code  and  possibly change it ->
               other platforms

          o    rewrite all those system()-calls

          o    complete manpage

          o    use autoconf

          o    use locales for different languages

          o    use long option names

          o    set hotkeys, colors etc. in  the  xforms  goodies  (any
               idea?)

          o    support for DragnDrop

          o    ...


          1111:: HHiissttoorryy


          0.3

          o    support for XForms 0.86

          o    some facelifting

          o    no debug-switch anymore

          o    window added showing error messages

          o    fixed buggy parsing of commandline

          0.2

          o    minor changes in sourcecode

          o    ssuunnssiittee is primary site now

          0.1alpha-3

          o    small changes in MMaakkeeffiillee

          o    now you dont need to install PriMa before testing











                                       -8-


          o    buttons  _R_e_v_e_r_s_e  _O_r_d_e_r  and _B_o_o_k _O_r_d_e_r are independent
               now and can be combined, _N_o_r_m_a_l _O_r_d_e_r deleted

          o    ppsssseelleecctt --rr will run after after ppssnnuupp and ppssbbooookk

          o    new script PriMa-Cmd to run any commands with the  out
               put

          0.1alpha-2

          o    fixed a bug in MMaakkeeffiillee

          o    included a statically linked binary

          0.1alpha
               First public release


          1122:: CCoonnttrriibbuuttoorrss

               Helpful hints and patches were contributed by:

          Sebastian  Matschke,  Christoph  Schmitz,  Aldo  Valente, H.
          Turgut Uyar and others.


          1133:: BByyee BByyee

               Changes, suggestions, patches  etc.  to   jjoorraa@@jjooppss..iinn--
          bbeerrlliinn..ddee .

          Enjoy,

          Jrg


























