312 | | |
313 | | |
314 | | |
315 | | [[BR]] |
316 | | [[BR]] |
317 | | [[BR]] |
318 | | [[BR]] |
319 | | [[BR]] |
320 | | [[BR]] |
321 | | [[BR]] |
322 | | [[BR]] |
323 | | [[BR]] |
324 | | [[BR]] |
325 | | |
326 | | |
327 | | |
328 | | |
329 | | |
330 | | An earlier version of the How To:- |
331 | | |
332 | | == A CUPS and eCS (OS/2) How To == |
333 | | |
334 | | |
335 | | Author: Peter Brown |
336 | | email: losepete@ntlworld.com |
337 | | |
338 | | CONTENTS |
339 | | |
340 | | |
341 | | Brief Preamble |
342 | | |
343 | | Why install CUPS? - and what is it? |
344 | | |
345 | | List of required software |
346 | | |
347 | | Brief description of the software packages |
348 | | |
349 | | Installation |
350 | | |
351 | | Configuration of CUPS Printer |
352 | | |
353 | | Creating a Desktop Printer Object to use with CUPS |
354 | | |
355 | | OS/2 Users - Creating the OS/2 printer driver |
356 | | |
357 | | eCS Users - Creating the OS/2 printer driver |
358 | | |
359 | | Common to both eCS and OS/2 Users |
360 | | |
361 | | Troubleshooting |
362 | | |
363 | | |
364 | | |
365 | | |
366 | | |
367 | | Brief Preamble[[BR]] |
368 | | ============== |
369 | | |
370 | | |
371 | | Hopefully this text will provide a clear enough "How To" for anyone to be able to follow. |
372 | | |
373 | | I 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. |
374 | | |
375 | | I 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. |
376 | | |
377 | | |
378 | | |
379 | | |
380 | | Why install CUPS? - and what is it?[[BR]] |
381 | | =================================== |
382 | | |
383 | | |
384 | | Common Unix Printing System answers the "what is it?" bit. |
385 | | |
386 | | |
387 | | Why 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. |
388 | | |
389 | | CUPS can provide drivers for more current printers - and should provide any extra capabilities missing from the OS/2 drivers. |
390 | | |
391 | | |
392 | | The object of the exercise is to end up with an eCS(OS/2) postscript printer object that prints using CUPS. |
393 | | |
394 | | |
395 | | |
396 | | |
397 | | List of required software[[BR]] |
398 | | ========================= |
399 | | |
400 | | |
401 | | eCS and OS/2 Users |
402 | | |
403 | | |
404 | | CUPS port - http://download.smedley.info/cups-1.3.7-gplgs-8.62-gutenprint-5.2.0-beta3-os2-20080616.zip |
405 | | |
406 | | LibC files required - http://download.smedley.info/libc064x.zip |
407 | | - ftp://ftp.netlabs.org/pub/gcc/libc-0.6.3-csd3.zip |
408 | | |
409 | | Updated PIN.EXE package - ftp://ftp.netlabs.org/pub/ecups/work/pinfix.zip |
410 | | |
411 | | eCUPS printer port - http://download.smedley.info/cupsportdriver-20080628.zip |
412 | | |
413 | | cleanppd - http://download.smedley.info/cleanppd.cmd *Not Required* if using InstPDR; see "eCS Users only" below |
414 | | |
415 | | PRNDRV.EXE - http://www.os2site.com/sw/comm/faxworks/prndrv.exe |
416 | | |
417 | | Also 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. |
418 | | |
419 | | To 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:- |
420 | | |
421 | | ftp://userid:password@ftp.ecomstation.com/Printer/ |
422 | | |
423 | | |
424 | | Obviously you need to replace userid and password with whatever values are displayed while pretending you want to download the 30.827 build. |
425 | | |
426 | | |
427 | | Not sure where OS/2 Users can get a copy of the 30.822 build... |
428 | | |
429 | | |
430 | | |
431 | | eCS Users only (could also be grabbed by OS/2 Users as it is "free" of the ecomstation betazone) |
432 | | -------------- |
433 | | |
434 | | Download and install this instPDR package http://download.smedley.info/instpdr_104.zip |
435 | | |
436 | | |
437 | | |
438 | | |
439 | | |
440 | | Brief description of the software packages[[BR]] |
441 | | ========================================== |
442 | | |
443 | | |
444 | | CUPS consists of several packages that work together to provide postscript printing on raster printers |
445 | | |
446 | | The LibC files are required support files |
447 | | |
448 | | The updated PIN.EXE package is used to add the PPD file to the OS/2 pscript.drv file |
449 | | |
450 | | The eCuPS printer port provides the "hook up" between the OS/2 Printer Object and the CUPS printer |
451 | | |
452 | | The 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 |
453 | | |
454 | | PRNDRV.EXE - a useful command line utility for listing installed printers and deleting those that are not wanted |
455 | | |
456 | | I think I said enough about the requirement for pscript.drv build 30_822 already... |
457 | | |
458 | | InstPDR 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. |
459 | | |
460 | | The 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... |
461 | | |
462 | | |
463 | | |
464 | | |
465 | | |
466 | | Installation[[BR]] |
467 | | ============ |
468 | | |
469 | | |
470 | | Put the PRNDRV.EXE file somewhere that you can find it; I put it into J:\Programs\Utils\PrnDrv |
471 | | |
472 | | Unzip 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) |
473 | | |
474 | | The libc0*.dll files should be put into either \ecs\dll or \os2\dll |
475 | | |
476 | | The basic CUPS Install consists of unzipping the package: |
477 | | |
478 | | The CUPS package MUST be unzipped to the ROOT of the drive, which should give you 3 new directories: \cups, \gutenprint and \gs |
479 | | NOTE: 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. |
480 | | |
481 | | Have 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. |
482 | | |
483 | | |
484 | | Other files are unzipped later as/when/if they are required |
485 | | |
486 | | |
487 | | |
488 | | |
489 | | Configuration of CUPS Printer[[BR]] |
490 | | ============================= |
491 | | |
492 | | |
493 | | The 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. |
494 | | |
495 | | |
496 | | Start \cups\sbin\cupsd.exe |
497 | | |
498 | | I 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. |
499 | | |
500 | | |
501 | | As 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. |
502 | | |
503 | | |
504 | | I 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 |
505 | | |
506 | | Name: PIXMA - what you want to call the printer |
507 | | |
508 | | Location: Router LPT1 - where it is physically located; ie connected to the Router's LPT1 port |
509 | | |
510 | | Description: Canon PIXMA iP4000 Inkjet - brief description of printer |
511 | | |
512 | | Continue - click when happy with above section |
513 | | |
514 | | |
515 | | Device: LPD/LPR Host or Printer - type of Device connection |
516 | | |
517 | | Continue - click when happy with above section |
518 | | |
519 | | |
520 | | Device URI: lpd://192.168.2.1/lpt1 - address of device |
521 | | |
522 | | Continue - click when happy with above section |
523 | | |
524 | | |
525 | | Make: Canon - select printer make |
526 | | |
527 | | Continue - click when happy with above section |
528 | | |
529 | | |
530 | | Model: Canon PIXMA iP4000 - CUPS+Gutenprint v5.2.0-beta3(en) Simplified - select correct driver; Simplified recommended |
531 | | |
532 | | Add Printer - click when happy with above section |
533 | | |
534 | | |
535 | | |
536 | | After 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." |
537 | | |
538 | | I 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. |
539 | | |
540 | | Well, that is the very easy bit finished... |
541 | | |
542 | | |
543 | | |
544 | | Referring 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:- |
545 | | |
546 | | |
547 | | [H:\cups\bin]lpr -P PIXMA \cups\share\cups\data\PReCS20.ps |
548 | | |
549 | | |
550 | | After a short wait the printer burst into action and delivered 2 pages of output that look fine. |
551 | | |
552 | | |
553 | | That is the next easy bit finished... |
554 | | |
555 | | |
556 | | |
557 | | |
558 | | |
559 | | |
560 | | Creating a Desktop Printer Object to use with CUPS[[BR]] |
561 | | ================================================== |
562 | | |
563 | | |
564 | | Now 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). |
565 | | |
566 | | |
567 | | The 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. |
568 | | |
569 | | |
570 | | I 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... |
571 | | |
572 | | |
573 | | |
574 | | |
575 | | |
576 | | OS/2 Users - Creating the OS/2 printer driver[[BR]] |
577 | | --------------------------------------------- |
578 | | |
579 | | |
580 | | 1] Create your own space for the job |
581 | | |
582 | | [H:]md \temp\printer |
583 | | |
584 | | |
585 | | 2] and somewhere to play with the PPD file |
586 | | |
587 | | [H:]md \temp\printer\ppd |
588 | | |
589 | | |
590 | | 3] Unzip a "virgin" - never been touched before - ps30822xx.zip file to H:\temp\printer |
591 | | |
592 | | |
593 | | 4] Unzip pinfix.exe into H:\temp\printer to overwrite the pin.exe and ppdenc.exe supplied with the ps30822xx package |
594 | | |
595 | | |
596 | | 5] Copy the cleanppd.cmd file to h:\temp\printer\ppd\cleanppd.cmd |
597 | | |
598 | | |
599 | | 6] Copy the required PPD file to h:\temp\printer\ppd eg:- |
600 | | |
601 | | [H:]Copy h:\cups\etc\cups\ppd\PIXMA.ppd h:\temp\printer\ppd\PIXMA.ppd |
602 | | |
603 | | |
604 | | 7] Run cleanppd against the PIXMA.ppd file to generate temp.ppd in the same directory eg:- |
605 | | |
606 | | [H:\temp\printer\ppd]cleanppd PIXMA.ppd |
607 | | |
608 | | |
609 | | 8] Check that H:\temp\printer\ppd\temp.ppd exists then Delete the H:\temp\printer\ppd\PIXMA.ppd file |
610 | | |
611 | | |
612 | | 9] Go up a directory |
613 | | |
614 | | [H:\temp\printer\ppd]cd .. |
615 | | |
616 | | |
617 | | 10] Run pin.exe against the temp.ppd file to add it to the virgin ps30822 pscript.drv |
618 | | |
619 | | [H:\temp\printer]pin ppd H:\temp\printer\ppd H:\temp\printer\pscript.drv |
620 | | |
621 | | |
622 | | Note: the above command will add *ALL* PPD files found in H:\temp\printer\ppd hence the reason for deleting PIXMA.ppd in step 8] |
623 | | |
624 | | You should see this at the end of the procedure indicating success:- |
625 | | |
626 | | ...... OK (Canon PIXMA iP4000) |
627 | | done: 1 devices converted, 0 failed |
628 | | FINISHED, SHUTTING DOWN |
629 | | done |
630 | | |
631 | | [H:\temp\printer] |
632 | | |
633 | | |
634 | | A quick look in the [H:\temp\printer] directory should reveal a new file, auxprint.pak |
635 | | |
636 | | Double 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. |
637 | | |
638 | | |
639 | | |
640 | | 11] 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. |
641 | | |
642 | | [H:\OS2\DLL\PSCRIPT]del *.* |
643 | | |
644 | | |
645 | | 12] Having deleted the existing files copy the pscript files from H:\temp\printer |
646 | | |
647 | | [H:\OS2\DLL\PSCRIPT]copy H:\temp\printer\*.* |
648 | | |
649 | | |
650 | | 13] 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 |
651 | | |
652 | | Name the printer - PIXMA in this case |
653 | | |
654 | | Select the output port - I used LPT1 initially and installed the cups printer port later |
655 | | |
656 | | Select the (pscript) driver for the printer - Canon PIXMA iP4000 |
657 | | |
658 | | |
659 | | |
660 | | |
661 | | |
662 | | |
663 | | eCS Users - Creating the OS/2 printer driver[[BR]] |
664 | | -------------------------------------------- |
665 | | |
666 | | |
667 | | The following is based on my eCS1.2R system and paths may need to be modified for other versions of eCS |
668 | | |
669 | | |
670 | | |
671 | | 1] Unzip a "virgin" - never been touched before - ps30822xx.zip file into H:\temp\printer |
672 | | |
673 | | 2] Unzip pinfix.exe into H:\temp\printer to overwrite the pin.exe and ppdenc.exe supplied with the ps30822xx package |
674 | | |
675 | | 3] 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 |
676 | | |
677 | | 4] Start InstPDR |
678 | | |
679 | | Select to "Update standard eComStation driver package" and click Begin |
680 | | |
681 | | Use the "Select Driver Package" file picker to select the H:\temp\printer\ps30822xx_NEW.zip file and click OK |
682 | | |
683 | | A successful update will be indicated by the "Update Complete" message. |
684 | | |
685 | | Select to "Import Postscript Printer Description" and click Begin |
686 | | |
687 | | Use the "Select PPD File" file picker to select the h:\cups\etc\cups\ppd\PIXMA.ppd file and click OK |
688 | | |
689 | | A successful update will be indicated by the "Done" message window:- |
690 | | |
691 | | |
692 | | Updating driver table ... |
693 | | |
694 | | The following printers have been imported into the PostScript driver: |
695 | | Canon PIXMA iP4000 |
696 | | |
697 | | Select "OK" to close this window. |
698 | | |
699 | | |
700 | | |
701 | | 5] Having added the printer PPD file now create the Desktop Printer Object by running the Desktop -> Local System -> Install Local Printer routine |
702 | | |
703 | | Name the printer - PIXMA in this case |
704 | | |
705 | | Select the output port - I used LPT1 initially and installed the cups printer port later. |
706 | | |
707 | | Select the (pscript) driver for the printer. |
708 | | |
709 | | |
710 | | |
711 | | |
712 | | Common to both eCS and OS/2 Users[[BR]] |
713 | | --------------------------------- |
714 | | |
715 | | |
716 | | Unzip cupsportdriver-20080628.zip |
717 | | |
718 | | cups.pdr into h:\os2\dll |
719 | | |
720 | | cupslpr.exe into h:\tcpip\bin |
721 | | |
722 | | |
723 | | |
724 | | |
725 | | Right Mouse Button on the new Desktop Printer Object and select Properties |
726 | | |
727 | | Select Printer driver tab |
728 | | Check the Default printer driver is correctly selected |
729 | | Set Job Properties: Paper Size, Tray, Media Type, Resolution must match the settings in the CUPS printer - and Save |
730 | | |
731 | | Select Output port tab |
732 | | Click Install new port button |
733 | | Select the CUPS1 port and click Install |
734 | | - if the port is not visible but the CUPS.pdr file is in \os2\dll Click New port drivers and set the |
735 | | directory to \os2\dll and click Find. The CUPS ports should appear. |
736 | | The settings for the CUPS port are |
737 | | Host: localhost - or use 127.0.0.1 |
738 | | Printer: PIXMA (this should be the same name as used for the CUPS printer) |
739 | | |
740 | | Close Printer Properties |
741 | | |
742 | | |
743 | | That should be setup complete so time to print a test page |
744 | | |
745 | | Verify that cupsd.exe is running *Before* testing |
746 | | |
747 | | Drag'n'Drop \cups\share\cups\data\testprint.ps onto the new Desktop Printer Object |
748 | | |
749 | | Select Printer-specific in the following dialog |
750 | | |
751 | | |
752 | | You should get the CUPS Test Page printed from your OS/2 Desktop Printer Object |
753 | | |
754 | | You can repeat the above test using the \cups\share\cups\data\PReCS20.ps file to test 2 page document printing. |
755 | | |
756 | | |
757 | | Both tests were successful here. |
758 | | |
759 | | |
760 | | I 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. |
761 | | |
762 | | |
763 | | |
764 | | NOTE: 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. |
765 | | |
766 | | |
767 | | |
768 | | |
769 | | |
770 | | Troubleshooting[[BR]] |
771 | | =============== |
772 | | |
773 | | |
774 | | Not 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. |
775 | | |
776 | | This 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. |
777 | | |
778 | | |
779 | | I 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. |
780 | | |
781 | | On testing printed text output from OpenOffice115 Writer was extremely small. |
782 | | |
783 | | |
784 | | I made a few modifications to the temp.ppd file and prepared to create a new printer based on this modified file. |
785 | | |
786 | | |
787 | | I deleted the |
788 | | |
789 | | existing OS/2 Desktop Printer Object, PIXMA |
790 | | |
791 | | pscript.drv files in \os2\dll\pscript from the command line:- |
792 | | |
793 | | [H:\OS2\DLL\PSCRIPT]del *.* |
794 | | |
795 | | |
796 | | I then used the prndrv.exe utility delete any traces left in the ini files. |
797 | | |
798 | | Using the prndrv -l command I see the following (after deleting the OS/2 Printer Object and the pscript.drv files):- |
799 | | |
800 | | |
801 | | [J:\Programs\Utils\PrnDrv]prndrv -l |
802 | | PrnDrv -- OS/2 Printer Driver Installer/Deinstaller |
803 | | Developed by Keller Group Inc. |
804 | | Copyright (c) 1991-1999 Keller Group Inc. All rights reserved. |
805 | | |
806 | | Found PrintQueue 'CanoniP4' PMPRINT |
807 | | Found PrintQueue 'i950' PMPRINT |
808 | | Found PrintQueue 'PSCRIPTH' PMPRINT |
809 | | Found Printer 'CanoniP4' SLPR1 OMNI.Canon i850,OMNI.Canon i950,PSCRIPT.HP Busine |
810 | | ss Inkjet 2250 PS |
811 | | Found PrinterDriver 'PSCRIPT.Canon iP4000' |
812 | | 'H:\OS2\DLL\PSCRIPT\pscript.drv' |
813 | | Found PrinterDriver 'PSCRIPT.HP Business Inkjet 2250 PS' |
814 | | 'H:\OS2\DLL\PSCRIPT\pscript.drv' |
815 | | Found PrinterDriver 'IBMNULL' |
816 | | 'H:\OS2\DLL\IBMNULL\IBMNULL.DRV' |
817 | | Found PrinterDriver 'OMNI.Canon i950' |
818 | | 'H:\OS2\DLL\OMNI\OMNI.DRV' |
819 | | Found PrinterDriver 'OMNI.Canon i850' |
820 | | 'H:\OS2\DLL\OMNI\OMNI.DRV' |
821 | | |
822 | | |
823 | | |
824 | | The PIXMA printer was using the 'PSCRIPT.Canon iP4000' printer driver |
825 | | |
826 | | |
827 | | The use of prndrv -d "unique identifier" removes the unwanted entries:- |
828 | | |
829 | | [J:\Programs\Utils\PrnDrv]prndrv -d PSCRIPT.Canon |
830 | | PrnDrv -- OS/2 Printer Driver Installer/Deinstaller |
831 | | Developed by Keller Group Inc. |
832 | | Copyright (c) 1991-1999 Keller Group Inc. All rights reserved. |
833 | | |
834 | | Found PrinterDriver 'PSCRIPT.Canon iP4000' |
835 | | 'H:\OS2\DLL\PSCRIPT\pscript.drv' |
836 | | deleted INI PM_DEVICE_DRIVERS:PSCRIPT |
837 | | deleted SYSINI PM_DEVICE_DD:PSCRIPT.Canon iP4000 |
838 | | |
839 | | [J:\Programs\Utils\PrnDrv] |