Changes between Initial Version and Version 1 of HowTo


Ignore:
Timestamp:
Jul 3, 2008, 1:16:03 PM (16 years ago)
Author:
psmedley
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • HowTo

    v1 v1  
     1
     2== A CUPS and eCS (OS/2) How To ==
     3
     4
     5Author: Peter Brown
     6email: losepete@ntlworld.com
     7
     8CONTENTS
     9
     10
     11Brief Preamble
     12
     13Why install CUPS? - and what is it?
     14
     15List of required software
     16
     17Brief description of the software packages
     18
     19Installation
     20
     21Configuration of CUPS Printer
     22
     23Creating a Desktop Printer Object to use with CUPS
     24
     25    OS/2 Users - Creating the OS/2 printer driver
     26
     27    eCS Users - Creating the OS/2 printer driver
     28
     29    Common to both eCS and OS/2 Users
     30
     31Troubleshooting
     32
     33
     34
     35
     36
     37Brief Preamble
     38==============
     39
     40
     41Hopefully this text will provide a clear enough "How To" for anyone to be able to follow.
     42
     43I am using my experience of getting a Canon PIXMA iP4000 inkjet printer working with, firstly, CUPS and then creating an OS/2 Printer Object that is capable of outputting print jobs through CUPS.
     44
     45I do use specific Drive Letter(s) in the following text that would need to be changed to reflect the correct drive letter on other systems. Most of the Paths used are specific to the CUPS installation; those that are not would need to be changed for other systems.
     46
     47
     48
     49
     50Why install CUPS? - and what is it?
     51===================================
     52
     53
     54Common Unix Printing System answers the "what is it?" bit.
     55
     56
     57Why install CUPS? - Simply because it is capable of supporting a lot of modern printers and is continually updated. The old OS/2 printer drivers are not that good, if you can find a driver that works, with modern raster printers and those drivers will not be updated.
     58
     59CUPS can provide drivers for more current printers - and should provide any extra capabilities missing from the OS/2 drivers.
     60
     61
     62The object of the exercise is to end up with an eCS(OS/2) postscript printer object that prints using CUPS.
     63
     64
     65
     66
     67List of required software
     68=========================
     69
     70
     71eCS and OS/2 Users
     72
     73
     74CUPS port - http://download.smedley.info/cups-1.3.7-gplgs-8.62-gutenprint-5.2.0-beta3-os2-20080616.zip
     75
     76LibC files required - http://download.smedley.info/libc064x.zip
     77                    - ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip
     78
     79Updated PIN.EXE package - ftp://ftp.netlabs.org/pub/ecups/work/pinfix.zip
     80
     81eCUPS printer port - http://download.smedley.info/cupsportdriver-20080628.zip
     82
     83cleanppd - http://download.smedley.info/cleanppd.cmd  *Not Required* if using InstPDR; see "eCS Users only" below
     84
     85PRNDRV.EXE - http://www.os2site.com/sw/comm/faxworks/prndrv.exe
     86
     87Also required is ps30822xx.zip - where xx is language specific ie English is ps30822en.zip - I have had no success with pscript.drv 30.827; no idea why 30.827 is a "dog"... but 30.822 works fine.
     88
     89To obtain ps30822en.zip I had to login at ecomstation, click on Download the latest software and updates, search for Printer and then select the Postscript printer driver (English) build 30.827, click download update and make a note of the ftp login details on the displayed download page to be able to login to the ftp server and browse the directory to get the 30.822 build. Your ftp line should look something like this:-
     90
     91ftp://userid:password@ftp.ecomstation.com/Printer/
     92
     93
     94Obviously you need to replace userid and password with whatever values are displayed while pretending you want to download the 30.827 build.
     95
     96
     97Not sure where OS/2 Users can get a copy of the 30.822 build...
     98
     99
     100
     101eCS Users only (could also be grabbed by OS/2 Users as it is "free" of the ecomstation betazone)
     102--------------
     103
     104Download and install this instPDR package http://download.smedley.info/instpdr_103-2.zip
     105
     106
     107
     108
     109
     110Brief description of the software packages
     111==========================================
     112
     113
     114CUPS consists of several packages that work together to provide postscript printing on raster printers
     115
     116The LibC files are required support files
     117
     118The updated PIN.EXE package is used to add the PPD file to the OS/2 pscript.drv file
     119
     120The eCuPS printer port provides the "hook up" between the OS/2 Printer Object and the CUPS printer
     121
     122The cleanppd.cmd file removes unwanted lines from the PPD file that will be used in creating the required OS/2 postscript driver - these lines cause silly problems if left in the PPD file
     123
     124PRNDRV.EXE - a useful command line utility for listing installed printers and deleting those that are not wanted
     125
     126I think I said enough about the requirement for pscript.drv build 30_822 already...
     127
     128InstPDR is a GUI to update printer drivers and add PPD files to pscript.drv; A highly recommended way to update (or backlevel) printer drivers and also to add PPD files; much easier than the "manual" way of adding a PPD file. This build also strips out the same unwanted lines as the modified cleanppd.cmd mentioned in Troubleshooting.
     129
     130The instPDR package is only available to those with a login at ecomstation.com usually; OS/2 Users may want to grab a copy while it is going and make life easier...
     131
     132
     133
     134
     135
     136Installation
     137============
     138
     139
     140Put the PRNDRV.EXE file somewhere that you can find it; I put it into J:\Programs\Utils\PrnDrv
     141
     142Unzip InstPDR to a similar useful location; I unzipped it into J:\Programs\Utils\InstPDR and then created a Desktop Program Object, InstPDR,  in Desktop -> Programs -> Utilities from the instPDR.exe file (RMB on the executable and select Create program object)
     143
     144The libc0*.dll files should be put into either \ecs\dll or \os2\dll
     145
     146The basic CUPS Install consists of unzipping the package:
     147
     148The CUPS package MUST be unzipped to the ROOT of the drive, which should give you 3 new directories: \cups, \gutenprint and \gs
     149NOTE: the readme.os2 file will end up in the drive root directory unless unzipped seperately into the \cups directory - which is how I unzipped it.
     150
     151Have a read of the readme.os2 before proceeding just to get an idea of what you are going to do; especially if attempting to setup a USB printer.
     152
     153
     154Other files are unzipped later as/when/if they are required
     155
     156
     157
     158
     159Configuration of CUPS Printer
     160=============================
     161
     162
     163The brief mention of USB in the CUPS readme file suggests that it is possible to use cups with a USB connected printer by creating an OS/2 printer object that uses the USB printer port, start the OS/2 lpd daemon (\tcpip\bin\lpd.exe) and print to the USB printer by setting the cups printer to use Device: lpd://localhost/printer_name when setting up that printer where localhost can be the ip address 127.0.0.1 and printer_name is the name of the OS/2 printer.
     164
     165
     166Start \cups\sbin\cupsd.exe
     167
     168I created a program object for this with the Start Minimized and Close Window on exit checked in the Properties, Session tab. This object can be put in the Startup folder so that cupsd.exe is started automatically at bootup.
     169
     170
     171As the CUPS browser admin interface seems to be working here I recommend using that interface to Add a Printer. Fire up your browser and point it at http://localhost:631/ (cups home page) and when that has loaded click Add Printer.
     172
     173
     174I added the following Canon PIXMA P4000 colour inkjet (raster) printer and will be using this printer as the example. The text after the "-" is to outline the purpose
     175
     176Name: PIXMA  - what you want to call the printer
     177
     178Location: Router LPT1  - where it is physically located; ie connected to the Router's LPT1 port
     179
     180Description: Canon PIXMA iP4000 Inkjet - brief description of printer
     181
     182Continue -  click when happy with above section
     183
     184
     185Device: LPD/LPR Host or Printer -  type of Device connection
     186
     187Continue -  click when happy with above section
     188
     189
     190Device URI: lpd://192.168.2.1/lpt1 -  address of device
     191
     192Continue -  click when happy with above section
     193
     194
     195Make: Canon -  select printer make
     196
     197Continue -  click when happy with above section
     198
     199
     200Model: Canon PIXMA iP4000 - CUPS+Gutenprint v5.2.0-beta3(en) Simplified -  select correct driver; Simplified recommended
     201
     202Add Printer -  click when happy with above section
     203
     204
     205
     206After clicking Add Printer the interface informs me that the printer has been added and loads the options for the printer - this can take a little while. It is a good idea to have a look through and make sure the options look useable - especially Media Size, Resolution and Image Type. When satisfied click Set Printer Options and the interface reports "Printer PIXMA has been configured successfully."
     207
     208I then clicked on the Printers tab and then clicked the Print Test Page button. Shortly after the Test Page popped out of the printer looking fine.
     209
     210Well, that is the very easy bit finished...
     211
     212
     213
     214Referring to the readme.os2 file I used the command line to print a 2 page document; I opened a command line window in \cups\bin and gave it a try:-
     215
     216
     217[H:\cups\bin]lpr -P PIXMA \cups\share\cups\data\PReCS20.ps
     218
     219
     220After a short wait the printer burst into action and delivered 2 pages of output that look fine.
     221
     222
     223That is the next easy bit finished...
     224
     225
     226
     227
     228
     229
     230Creating a Desktop Printer Object to use with CUPS
     231==================================================
     232
     233
     234Now to hook CUPS up to the rest of the system so that CUPS can be used for output by applications such as OpenOffice Writer (wordprocessor) and PMView (images).
     235
     236
     237The process is slightly different for eCS and OS/2 Users due to the InstPDR software available to eCS Users from the ecomstation betazone; InstPDR is a graphical interface that helps with this job.
     238
     239
     240I will work through the manual method for OS/2 Users and follow that with the method using InstPDR for eCS Users - who can perform the manual method if they prefer...
     241
     242
     243
     244
     245
     246OS/2 Users - Creating the OS/2 printer driver
     247---------------------------------------------
     248
     249
     2501] Create your own space for the job
     251
     252    [H:]md \temp\printer
     253
     254
     2552] and somewhere to play with the PPD file
     256
     257    [H:]md \temp\printer\ppd
     258
     259
     2603] Unzip a "virgin" - never been touched before - ps30822xx.zip file to H:\temp\printer
     261
     262
     2634] Unzip pinfix.exe into H:\temp\printer to overwrite the pin.exe and ppdenc.exe supplied with the ps30822xx package
     264
     265
     2665] Copy the cleanppd.cmd file to h:\temp\printer\ppd\cleanppd.cmd
     267
     268
     2696] Copy the required PPD file to h:\temp\printer\ppd eg:-
     270
     271    [H:]Copy h:\cups\etc\cups\ppd\PIXMA.ppd h:\temp\printer\ppd\PIXMA.ppd
     272
     273
     2747] Run cleanppd against the PIXMA.ppd file to generate temp.ppd in the same directory eg:-
     275
     276    [H:\temp\printer\ppd]cleanppd PIXMA.ppd
     277
     278
     2798] Check that H:\temp\printer\ppd\temp.ppd exists then Delete the H:\temp\printer\ppd\PIXMA.ppd file
     280
     281
     2829] Go up a directory
     283
     284    [H:\temp\printer\ppd]cd ..
     285
     286
     28710] Run pin.exe against the temp.ppd file to add it to the virgin ps30822 pscript.drv
     288
     289    [H:\temp\printer]pin ppd H:\temp\printer\ppd H:\temp\printer\pscript.drv
     290
     291
     292Note: the above command will add *ALL* PPD files found in H:\temp\printer\ppd hence the reason for deleting PIXMA.ppd in step 8]
     293
     294You should see this at the end of the procedure indicating success:-
     295
     296...... OK (Canon PIXMA iP4000)
     297done: 1 devices converted, 0 failed
     298FINISHED, SHUTTING DOWN
     299done
     300
     301[H:\temp\printer]
     302
     303
     304A quick look in the [H:\temp\printer] directory should reveal a new file, auxprint.pak
     305
     306Double clicking the H:\temp\printer\pscript.drv to open it should show the printer that was added; I have a Canon PIXMA iP4000 added to the printers displayed by that driver.
     307
     308
     309
     31011] The next step is to replace any existing installation of pscript.drv with this version. Open a command line window in the \os2\dll\pscript directory and delete all files - you need to perform this from the command line as the WPS will not delete the pscript.drv file but the command line will.
     311
     312    [H:\OS2\DLL\PSCRIPT]del *.*
     313
     314
     31512] Having deleted the existing files copy the pscript files from H:\temp\printer
     316
     317    [H:\OS2\DLL\PSCRIPT]copy H:\temp\printer\*.*
     318
     319
     32013] Open the Desktop -> Templates folder and drag the Printer template to the Desktop to start the Create printer routine; You may need to point the install routine to h:\os2\dll\pscript and click Refresh in order to see the printer listed
     321
     322    Name the printer - PIXMA in this case
     323
     324    Select the output port - I used LPT1 initially and installed the cups printer port later
     325
     326    Select the (pscript) driver for the printer - Canon PIXMA iP4000
     327
     328
     329
     330
     331
     332
     333eCS Users - Creating the OS/2 printer driver
     334--------------------------------------------
     335
     336
     337The following is based on my eCS1.2R system and paths may need to be modified for other versions of eCS
     338
     339
     340
     3411] Unzip a "virgin" - never been touched before - ps30822xx.zip file into H:\temp\printer
     342
     3432] Unzip pinfix.exe into H:\temp\printer to overwrite the pin.exe and ppdenc.exe supplied with the ps30822xx package
     344
     3453] Zip all files H:\temp\printer\*.* into H:\temp\printer\ps30822xx_NEW.zip - this file will be used by InstPDR to update the existing pscript driver files
     346
     3474] Start InstPDR
     348
     349    Select to "Update standard eComStation driver package" and click Begin
     350
     351    Use the "Select Driver Package" file picker to select the H:\temp\printer\ps30822xx_NEW.zip file and click OK
     352
     353    A successful update will be indicated by the "Update Complete" message.
     354
     355    Select to "Import Postscript Printer Description" and click Begin
     356
     357    Use the "Select PPD File" file picker to select the h:\cups\etc\cups\ppd\PIXMA.ppd file and click OK
     358
     359    A successful update will be indicated by the "Done" message window:-
     360       
     361
     362    Updating driver table ...
     363
     364    The following printers have been imported into the PostScript driver:
     365      Canon PIXMA iP4000
     366
     367    Select "OK" to close this window.
     368
     369
     370
     3715] Having added the printer PPD file now create the Desktop Printer Object by running the Desktop -> Local System -> Install Local Printer routine
     372
     373    Name the printer - PIXMA in this case
     374
     375    Select the output port - I used LPT1 initially and installed the cups printer port later.
     376
     377    Select the (pscript) driver for the printer.
     378
     379
     380
     381
     382Common to both eCS and OS/2 Users
     383---------------------------------
     384
     385
     386Unzip cupsportdriver-20080628.zip
     387
     388    cups.pdr into h:\os2\dll
     389
     390    cupslpr.exe into h:\tcpip\bin
     391
     392
     393
     394
     395Right Mouse Button on the new Desktop Printer Object and select Properties
     396
     397    Select Printer driver tab
     398    Check the Default printer driver is correctly selected
     399    Set Job Properties: Paper Size, Tray, Media Type, Resolution must match the settings in the CUPS printer - and Save
     400   
     401    Select Output port tab
     402    Click Install new port button
     403    Select the CUPS1 port and click Install
     404        - if the port is not visible but the CUPS.pdr file is in \os2\dll Click New port drivers and set the
     405          directory to \os2\dll and click Find. The CUPS ports should appear.
     406    The settings for the CUPS port are
     407        Host: localhost - or use 127.0.0.1
     408        Printer: PIXMA  (this should be the same name as used for the CUPS printer)
     409
     410    Close Printer Properties
     411
     412
     413That should be setup complete so time to print a test page
     414
     415    Verify that cupsd.exe is running *Before* testing
     416
     417    Drag'n'Drop \cups\share\cups\data\testprint.ps onto the new Desktop Printer Object
     418   
     419    Select Printer-specific in the following dialog
     420
     421
     422You should get the CUPS Test Page printed from your OS/2 Desktop Printer Object
     423
     424You can repeat the above test using the \cups\share\cups\data\PReCS20.ps file to test 2 page document printing.
     425
     426
     427Both tests were successful here.
     428
     429
     430I then successfully printed a jpeg image from PMView2000, a 2 page document from OpenOffice115 Writer, a 3 page PDF document from Lucide, a section of the WDSibyl help viewed using NewView and a source file in use in WDSibyl using my newly created "postscript" PIXMA printer.
     431
     432
     433
     434NOTE: As mentioned above in the section "Right Mouse Button on the new Desktop Printer Object and select Properties" Settings for print jobs should be the same in both the OS/2 printer Job properties and the CUPS printer settings to avoid problems with output such as wrong size text.
     435
     436
     437
     438
     439
     440Troubleshooting
     441===============
     442
     443
     444Not much to put in here except: If things go wrong when adding the PPD file to the OS/2 pscript.drv the PRNDRV.EXE utility will come in handy.
     445
     446This can list and delete printers and queues - which I found useful during my early attempts to create an OS/2 pscript printer using the relevent CUPS PPD file.
     447
     448
     449I found after working through the "Create a driver" steps that the OS/2 Printer Object eventually created had possible problems. When I was checking the Job properties (Printer driver tab of the Printer Properties) I noticed that the Resolution options listed (on the Output tab) included the options for Duplex printing.
     450
     451On testing printed text output from OpenOffice115 Writer was extremely small.
     452
     453
     454I made a few modifications to the temp.ppd file and prepared to create a new printer based on this modified file.
     455
     456
     457I deleted the
     458
     459    existing OS/2 Desktop Printer Object, PIXMA
     460
     461    pscript.drv files in \os2\dll\pscript from the command line:-
     462
     463        [H:\OS2\DLL\PSCRIPT]del *.*
     464
     465
     466I then used the prndrv.exe utility delete any traces left in the ini files.
     467
     468Using the prndrv -l command I see the following (after deleting the OS/2 Printer Object and the pscript.drv files):-
     469
     470
     471[J:\Programs\Utils\PrnDrv]prndrv -l
     472PrnDrv -- OS/2 Printer Driver Installer/Deinstaller
     473Developed by Keller Group Inc.
     474Copyright (c) 1991-1999 Keller Group Inc. All rights reserved.
     475
     476Found PrintQueue 'CanoniP4' PMPRINT
     477Found PrintQueue 'i950' PMPRINT
     478Found PrintQueue 'PSCRIPTH' PMPRINT
     479Found Printer 'CanoniP4' SLPR1 OMNI.Canon i850,OMNI.Canon i950,PSCRIPT.HP Busine
     480ss Inkjet 2250 PS
     481Found PrinterDriver 'PSCRIPT.Canon iP4000'
     482                    'H:\OS2\DLL\PSCRIPT\pscript.drv'
     483Found PrinterDriver 'PSCRIPT.HP Business Inkjet 2250 PS'
     484                    'H:\OS2\DLL\PSCRIPT\pscript.drv'
     485Found PrinterDriver 'IBMNULL'
     486                    'H:\OS2\DLL\IBMNULL\IBMNULL.DRV'
     487Found PrinterDriver 'OMNI.Canon i950'
     488                    'H:\OS2\DLL\OMNI\OMNI.DRV'
     489Found PrinterDriver 'OMNI.Canon i850'
     490                    'H:\OS2\DLL\OMNI\OMNI.DRV'
     491
     492
     493
     494The PIXMA printer was using the 'PSCRIPT.Canon iP4000' printer driver
     495
     496
     497The use of prndrv -d "unique identifier" removes the unwanted entries:-
     498
     499[J:\Programs\Utils\PrnDrv]prndrv -d PSCRIPT.Canon
     500PrnDrv -- OS/2 Printer Driver Installer/Deinstaller
     501Developed by Keller Group Inc.
     502Copyright (c) 1991-1999 Keller Group Inc. All rights reserved.
     503
     504Found PrinterDriver 'PSCRIPT.Canon iP4000'
     505                    'H:\OS2\DLL\PSCRIPT\pscript.drv'
     506    deleted INI PM_DEVICE_DRIVERS:PSCRIPT
     507    deleted SYSINI PM_DEVICE_DD:PSCRIPT.Canon iP4000
     508
     509[J:\Programs\Utils\PrnDrv]