Patch title: Release 81 bulk changes
Abstract:
File: /pliant/protocol/lpr/configure.page
Key:
    Removed line
    Added line
   
module "/pliant/fullpliant/this_computer.pli"
module "/pliant/language/stream.pli"
module "/pliant/admin/file.pli"
module "/pliant/graphic/color/gamut.pli"
module "/pliant/graphic/color/database.pli"
module "embedded.pli"
module "spool.pli"


module "/pliant/fullpliant/this_computer.pli"
module "/pliant/language/stream.pli"
module "/pliant/admin/file.pli"
module "/pliant/graphic/color/gamut.pli"
module "/pliant/graphic/color/database.pli"
module "embedded.pli"
module "spool.pli"


table columns 5
table columns 4
  cell header [Print queue]
  cell header [Label]
  cell header [Print queue]
  cell header [Label]
  cell header [Device]
  cell header [Default]
  cell void
  each p this_computer:env:"printer"
    cell
      text keyof:p
    cell
      text p:"label"
    cell
  cell header [Default]
  cell void
  each p this_computer:env:"printer"
    cell
      text keyof:p
    cell
      text p:"label"
    cell
      text p:"device"
    cell
      text p:"default"
    cell
      text p:"default"
    cell
      page button "edit"
      page button "configure"
        var (Data Set:Str) p :> this_computer:env:"printer" 
        title "Print queue '"+keyof:p+"'"

        var (Data Set:Str) p :> this_computer:env:"printer" 
        title "Print queue '"+keyof:p+"'"

        header "Express configuration"
          note inline
            para
              highlight "under construction"
            select "Printer profile: " (var Str cdevice)
        note inline
          bold [- Expression configuration -]
          para
            [1. ]
            select "Select a profile: " (var Str cdevice)
              option "" ""
              each cdev color_database:data:device
              each cdev color_database:data:device
                if (cdev:options option "filter" Str)<>""
                  option cdev:label keyof:cdev
            select "Printer is connected to:" (var Str pdevi
                if cdev:printer:driver<>""
                  option cdev:printer:model+" with "+cdev:printer:paper keyof:cdev
          para
            [2. ]
            select "How is the printer connected:" (var Str pdevice) noeol
              option "parallel port" "device:/lp0"
              option "usb port" "device:/usb/lp0"
              option "a print server" "lpr"
              option "parallel port" "device:/lp0"
              option "usb port" "device:/usb/lp0"
              option "a print server" "lpr"
            page button "Auto configure"
            input "IP:" (var Str ip) length 15 noeol
            var Str queue := "lp"
            input "queue:" queue length 10
            italic [You need to fill 'IP' and 'queue' only if the printer is connected through a print server.]
          para
            [3. Press ]
            button "configure all at once" noeol
              var Data:ColorDevice prof :> color_database:da
              var Data:ColorDevice prof :> color_database:da
              this_computer "printer" keyof:p "label" := pro
              this_computer "printer" keyof:p "gamut" := key
              this_computer "printer" keyof:p "device" := (shunt pdevice="lpr" "lprng://"+ip+"/"+queue pdevice)
              this_computer "printer" keyof:p "label" := prof:printer:model+" "+prof:printer:paper
              this_computer "printer" keyof:p "once" := "true"
              this_computer "printer" keyof:p "timeout" := shunt (pdevice parse "device:/usb/" any) "" "120"
              this_computer "printer" keyof:p "export" := "127.0.0.1"
              each f (prof:printer pmap "" Set:Str)
                this_computer "printer" keyof:p keyof:f := f
              reload_page
              reload_page
            [ button.]


        header "Detailed configuration"
          header "Description"
            table columns 3 border 0
              cell [Queue label:]
              cell
                var Str label := p "label"
                input "" label length 40
              cell
                void
          header "Driver"
            table columns 3 border 0
              cell [Pliant filter:]
              cell
                var Str filter := p "filter"
                input "" filter length 10
              cell
                [The filter is the Pliant driver.] ; eol
                [Most common filter are] ; fixed [ .escp2 ] 
                fixed [ .pcl ] ; [for HP Designjet (does not
                [and ] ; fixed [ .gimprint ] ; [if the print
              cell [Pliant options:]
              cell
                var Str options := p "options"
                input "" options length 40
              cell
                void
              cell [Gamut:]
              cell
                var Str gamut := p "gamut"
                input "" gamut length 40
              cell
                void
              cell [Calibration steps:]
              cell
                var Str grid_steps := p "grid_steps"
                input "" grid_steps length 2
              cell
                [How many steps do we compute on the calibra
                [33 is perfect but will require several hour
              cell [Paper size:]
              cell
                var Str size_x := p "size_x"
                input "" size_x length 4 noeol
                var Str size_y := p "size_y"
                input " x " size_y length 4 noeol
                [ mm]
              cell
                void
              cell [Margins:]
              cell
                var Str margin_left := p "margin_left"
                var Str margin_top := p "margin_top"
                var Str margin_right := p "margin_right"
                var Str margin_bottom := p "margin_bottom"
                input "L" margin_left length 3 noeol
                input "T" margin_top length 3 noeol
                input "R" margin_right length 3 noeol
                input "B" margin_bottom length 3 noeol
                [ mm]
              cell
                void
              cell [R鳯lution:]
              cell
                var Str resolution_x := p "resolution_x"
                input "" resolution_x length 4 noeol
                var Str resolution_y := p "resolution_y"
                input " x " resolution_y length 4 noeol
                [ dpi]
              cell
                void
              cell [Antialiasing:]
              cell
                var Str antialiasing := p "antialiasing"
                input "" antialiasing length 1
              cell
                [Use no antialiasing if your computer is slo
              cell [Sharpening:]
              cell
                var Str sharpening := p "sharpening"
                input "" sharpening length 5
              cell
                [Leave it blank unless you want to experimen
              cell [Middle density:]
              cell
                var Str middle := p "middle"
                input "" middle length 5
              cell
                [Leave it blank unless you know what you do:
              cell [Maximum density:]
              cell
                var Str limit := p "limit"
                input "" limit length 5
              cell
                [Leave it blank unless you know what you do:
          header "Connection"
            table columns 3 border 0
              cell [Printer ID:]
              cell
                var Str printer_id := p "printer"
                input "" printer_id length 16
              cell
                [If several queues connect to the same physi
              cell [Device:]
              cell
                var Str device := p "device"
                input "" device length 40
              cell
                [Probably] ; fixed [ device:/lp0 ] ; [if you
                fixed [ device:/usb/lp0 ] ; [if the printer 
                [or something like] ; fixed [ lpr://server_n
                note "more details"
                  title "Remote printers"
                  para
                    [If the printer is connected to an LPRng
                  para
                    [If the printer is connected to a print 
              cell [Tiemout:]
              cell
                var Str timeout := p "timeout"
                input "" timeout length 4 noeol ; [ seconds]
              cell
                void
              cell [Print on the fly:]
              cell
                var Str once := p "once"
                select "" once
                  option "" ""
                  option "yes" "true"
                  option "no" "false"
              cell
                [Should print while receiving, or store then
                [In case of troubles, just say 'no'.]
              cell [Export:]
              cell
                var Str export := p "export"
                input "" export length 40
              cell
                [Specify here the IP addresses that are allo
                [An example could be:]
                fixed [ 127.0.0.1 10.0.0.0/255.0.0.0]
              cell [Default:]
              cell
                var Str default := p "default"
                select "" default
                  option "" ""
                  option "yes" "true"
                  option "no" "false"
              cell
                [Is this the default queue usually named 'lp
          header "Action"
            para
              button "Update printer queue settings"
                this_computer "printer" keyof:p "label" := l
                this_computer "printer" keyof:p "filter" := 
                this_computer "printer" keyof:p "options" :=
                this_computer "printer" keyof:p "gamut" := g
                this_computer "printer" keyof:p "grid_steps"
                this_computer "printer" keyof:p "sharpening"
                this_computer "printer" keyof:p "middle" := 
                this_computer "printer" keyof:p "limit" := l
                this_computer "printer" keyof:p "size_x" := 
                this_computer "printer" keyof:p "size_y" := 
                this_computer "printer" keyof:p "margin_left
                this_computer "printer" keyof:p "margin_top"
                this_computer "printer" keyof:p "margin_righ
                this_computer "printer" keyof:p "margin_bott
                this_computer "printer" keyof:p "resolution_
                this_computer "printer" keyof:p "resolution_
                this_computer "printer" keyof:p "antialiasin
                this_computer "printer" keyof:p "printer" :=
                this_computer "printer" keyof:p "device" := 
                this_computer "printer" keyof:p "timeout" :=
                this_computer "printer" keyof:p "once" := on
                this_computer "printer" keyof:p "export" := 
                this_computer "printer" keyof:p "default" :=
                each v (this_computer:env:"printer" keyof:p)
                  if v=""
                   (this_computer:env:"printer" keyof:p) del
                lpr_embedded_configure "embedded:/"
                goto_backward
            para
        header "Description"
          table columns 3 border 0
            cell [Queue label:]
            cell
              var Str label := p "label"
              input "" label length 40
            cell
              void
        header "Driver (most of it should be automatically field from the profile selected in express configuration)"
          table columns 3 border 0
            cell [Driver:]
            cell
              var Str driver := p "driver"
              input "" driver length 10
            cell
              [The filter is the Pliant driver.] ; eol
              [Most common filter are] ; fixed [ escp2 ] ; [for Epson stylus line,]
              fixed [ pcl ] ; [for HP Designjet (does not work on HP Desktop inkjet printers), ]
              [and ] ; fixed [ gimprint ] ; [if the printer will be driver using Gimp-print free software.]
            cell [Model:]
            cell
              var Str model := p "model"
              input "" model length 10
            cell
              [Must be one of the models the driver is awared of.]
            cell [Extra options:]
            cell
              var Str options := p "options"
              input "" options length 40
            cell
              [As an example, the] ; fixed [ escp2 ] ; [driver recognizes] ; fixed [ unidirectional ] ; [option.]
            cell [Paper name:]
            cell
              var Str paper := p "paper"
              input "" paper length 30 noeol
            cell
              [This is informative only.]
            cell [Paper size:]
            cell
              var Str size_x := p "size_x"
              input "" size_x length 4 noeol
              var Str size_y := p "size_y"
              input " x " size_y length 4 noeol
              [ mm]
            cell
              void
            cell [Margins:]
            cell
              var Str margin_left := p "margin_left"
              var Str margin_top := p "margin_top"
              var Str margin_right := p "margin_right"
              var Str margin_bottom := p "margin_bottom"
              input "L" margin_left length 3 noeol
              input "T" margin_top length 3 noeol
              input "R" margin_right length 3 noeol
              input "B" margin_bottom length 3 noeol
              [ mm]
            cell
              void
            cell [R鳯lution:]
            cell
              var Str resolution_x := p "resolution_x"
              input "" resolution_x length 4 noeol
              var Str resolution_y := p "resolution_y"
              input " x " resolution_y length 4 noeol
              [ dpi]
            cell
              void
            cell [Antialiasing:]
            cell
              var Str antialiasing := p "antialiasing"
              input "" antialiasing length 1
            cell
              [Use no antialiasing if your computer is slow, 2 if your computer is faster than the printer.] 
            cell [Sharpening:]
            cell
              var Str sharpening := p "sharpening"
              input "" sharpening length 5
            cell
              [Leave it blank unless you want to experiment.]
            cell [Maximum density:]
            cell
              var Str limit := p "limit"
              input "" limit length 5
            cell
              [Leave it blank unless you know what you do: this is not the right way to correct a poor calibration.]
            cell [Middle density:]
            cell
              var Str middle := p "middle"
              input "" middle length 5
            cell
              [Leave it blank unless you know what you do: this is not the right way to correct a poor calibration.]
            cell [Gamut:]
            cell
              var Str gamut := p "gamut"
              input "" gamut length 40
            cell
              var Float ctimeout := 86400
              button "Compute calibration grid" noeol
                color_gamut_compute "rgb" this_computer:env:
                reload_page
              input " no more than " ctimeout length 6 noeol
              [seconds]
              var Float ctimeout := 86400
              button "Compute calibration grid" noeol
                color_gamut_compute "rgb" this_computer:env:
                reload_page
              input " no more than " ctimeout length 6 noeol
              [seconds]
            para
              note "display raw print queue settings (useful
                var (Data Set:Str) p :> this_computer:env:"p
                title "Print queue '"+keyof:p+"'"
                table columns 2
                  cell header [Variable]
                  cell header [Value]
                  each v p
                    cell (text keyof:v)
                    cell text:v
            cell [Calibration steps:]
            cell
              var Str grid_steps := p "grid_steps"
              input "" grid_steps length 2 noeol
            cell
              [How many steps do we compute on the calibration grid in each dimension. ]
              [33 is perfect but will require several hours of calibration on a fast computer, 17 is high quality, and 9 is correct.]
        header "Connection"
          table columns 3 border 0
            cell [Printer ID:]
            cell
              var Str printer_id := p "printer"
              input "" printer_id length 16
            cell
              [If several queues connect to the same physical printer, they should have the same printer ID in order to avoid to send several jobs all at once.]
            cell [Device:]
            cell
              var Str device := p "device"
              input "" device length 40
            cell
              [Probably] ; fixed [ device:/lp0 ] ; [if you are using the so called parallel interface,]
              fixed [ device:/usb/lp0 ] ; [if the printer is connected to an USB port, ]
              [or something like] ; fixed [ lpr://server_name/queue_name ] ; [ is the printer is connected to another server or a print server. ]
              note "more details"
                title "Remote printers"
                para
                  [If the printer is connected to an LPRng compatible server (accepting send on the fly feature), then you can try something like] ; fixed [ lprng://server_name/queue_name ] ; eol
                para
                  [If the printer is connected to a print server it may accept FTP connections through something like] ; fixed [ ftp://server_name/client/queue_name ] ; [where 'client' is an identifier that you must not change.]
            cell [Timemout:]
            cell
              var Str timeout := p "timeout"
              input "" timeout length 4 noeol ; [ seconds]
            cell
              highlight "warning: " ; [Don't set a timeout if the printer is connected through USB on Linux because it would raise a Linux kernel bug.]
            cell [Print on the fly:]
            cell
              var Str once := p "once"
              select "" once
                option "" ""
                option "yes" "true"
                option "no" "false"
            cell
              [Should print while receiving or ripping, or store then print. ]
              [In case of troubles, just say 'no'.] ; eol
              [If you want to print on the fly to a printer connecter through a print server, you have to replace 'lpr:' with 'lprng:' in the device field, and the remote print server implementation must be correct (as an example, LPRng is, but basic LPD daemon is not).]
            cell [Export:]
            cell
              var Str export := p "export"
              input "" export length 40
            cell
              [Specify here the IP addresses that are allowed to print on the printer.] ; eol
              [An example could be:]
              fixed [ 127.0.0.1 10.0.0.0/255.0.0.0]
            cell [Default:]
            cell
              var Str default := p "default"
              select "" default
                option "" ""
                option "yes" "true"
                option "no" "false"
            cell
              [Is this the default queue usually named 'lp' in Unix world ?]
        para
          button "Update printer queue settings"
            this_computer "printer" keyof:p "label" := label
            this_computer "printer" keyof:p "driver" := driver
            this_computer "printer" keyof:p "model" := model
            this_computer "printer" keyof:p "options" := options
            this_computer "printer" keyof:p "sharpening" := sharpening
            this_computer "printer" keyof:p "middle" := middle
            this_computer "printer" keyof:p "limit" := limit
            this_computer "printer" keyof:p "paper" := paper
            this_computer "printer" keyof:p "size_x" := size_x
            this_computer "printer" keyof:p "size_y" := size_y
            this_computer "printer" keyof:p "margin_left" := margin_left
            this_computer "printer" keyof:p "margin_top" := margin_top
            this_computer "printer" keyof:p "margin_right" := margin_right
            this_computer "printer" keyof:p "margin_bottom" := margin_bottom
            this_computer "printer" keyof:p "resolution_x" := resolution_x
            this_computer "printer" keyof:p "resolution_y" := resolution_y
            this_computer "printer" keyof:p "antialiasing" := antialiasing
            this_computer "printer" keyof:p "gamut" := gamut
            this_computer "printer" keyof:p "grid_steps" := grid_steps
            this_computer "printer" keyof:p "printer" := printer_id
            this_computer "printer" keyof:p "device" := device
            this_computer "printer" keyof:p "timeout" := timeout
            this_computer "printer" keyof:p "once" := once
            this_computer "printer" keyof:p "export" := export
            this_computer "printer" keyof:p "default" := default
            each v (this_computer:env:"printer" keyof:p)
              if v=""
               (this_computer:env:"printer" keyof:p) delete keyof:v
            lpr_embedded_configure "embedded:/"
            goto_backward
        para
          note "display raw print queue settings (usefull only for debugging)"
            var (Data Set:Str) p :> this_computer:env:"printer" keyof:p
            title "Print queue '"+keyof:p+"'"
            table columns 2
              cell header [Variable]
              cell header [Value]
              each v p
                cell (text keyof:v)
                cell text:v
    

input "Queue name: " (var Str qname) noeol
page button "Create new printer queue" noeol
  this_computer "printer" qname "physical" := qname
  reload_page
page button "Delete the printer queue" noeol
  this_computer:env:"printer" delete qname
  reload_page
    

input "Queue name: " (var Str qname) noeol
page button "Create new printer queue" noeol
  this_computer "printer" qname "physical" := qname
  reload_page
page button "Delete the printer queue" noeol
  this_computer:env:"printer" delete qname
  reload_page