IBM's Omni Driver Model for Ghostscript Printing - version 0.0.1 ================================================================= This is our first release of the Omni driver for Ghostscript printing on Linux. This release contains support for over 100 printers and establishes a model that allows for additional device to be easily added by editing or adding device description files. We have also enabled faster driver development with the ability to easily extend the existing device support with features of a new device through a well defined pluggable interface. Additionally, The Omni driver supports the dynamic loading of new device support. Once you have build this package with Ghostscript, printer drivers can be built separately and applied to a system without having to rebuild Ghostscript on the target systems. Accurate per device printer features are supported through command line options allowing the user to change multiple properties of the completed output. We have also provided a utility for querying the available options on a particular device. We will continue to improve upon this code by adding new function and features. Since the driver model and code are not 100% completed yet, we welcome any feedback concerning the driver/driver model along with any problems or issues that might arise during its use. We also would like to have any contributions that will increase the stability, performance, or feature set of the Omni driver. We have not tuned the color output on all devices to date. If your output colors are not correct, please refer to section 5 (Omni color adjustment) to adjust the gammas to best suit your printer and inks. The remainder of this readme describes: - how and where to download the source from - how to structure and build Ghostscript and the Omni driver - how to use Ghostscript with the Omni driver 1. Build Components Needed ======================= 1.1 Current version of GNU Ghostscript 5.50 Licensing: http://www.cs.wisc.edu/~ghost/gnu/index.html Download Ghostscript required files for the ability of building the ghostscript executable Download: ftp://ftp.cs.wisc.edu/ghost/gnu/gs550/ gnu-gs-5.50.tar.gz gnu-gs-5.50jpeg.tar.gz gnu-gs-5.50libpng.tar.gz gnu-gs-5.50zlib.tar.gz referenced from: http://www.cs.wisc.edu/~ghost/gnu/gnu550.html Additional components that need to be downloaded to enable support of the Omni driver in Ghostscript. 1.2 Antlr parsing code Go to www.jguru.com/antlr/download/index.jsp to download the Antlr parsing code. Follow the screens and register to use code. 1.3 IBM Java 1.1.8 http://www.ibm.com/java/jdk/118/linux The file that is currently available from the IBM site is: IBMJava118-SDK-1.1.8-3.0.i386.rpm **NOTE The previous levels described above are the levels of code used to build and test the Omni driver. There may be newer versions of each of these products so the installation/setup methods could be slightly different. 1.4 Debugging Tools ** The following two items are optional. They can be very useful if code debugging is necessary to resolve a problem. 1.4.1 DDD debugger Go to http://www.redhat.com/swr/i386/ddd-3.2-4.i386.html. This will bring you to the download page for DDD debugger interface. Select download and you will be brought to a page to allow down- loading of the package for instance: ftp://ftp.sourceforge.net/pub/mirrors/redhat/redhat/powertools/6.2/i386/i386/ddd-3.2-4.i386.rpm 1.4.2 Lesstif libraries Go to http://www.redhat.com/swr/i386/lesstif-1.2-devel-0.89.9-2.i386.html and select download of the package from one of the available sites. ftp://ftp.sourceforge.net/pub/mirrors/redhat/redhat/powertools/6.2/i386/i386/lesstif-1.2-devel-0.89.9-2.i386.rpm 2. Installation ============ NOTE: These commands assume that you use the proper paths for copying/unziping Ex: the files are located in /tmp Install the JDK 1.1.8 or above rpm -i /tmp/IBMJava118-SDK-1.1.8-2.0.i386.rpm Install Ghostscript extract ghostscript cd / tar -xvzf /tmp/gnu-gs-5.50.tar.gz change to that directory cd gs5.50 extract the 3rd party source files tar -xvzf /tmp/gnu-gs-5.50jpeg.tar.gz mv jpeg-6b jpeg tar -xvzf /tmp/gnu-gs-5.50libpng.tar.gz mv libpng-1.0.2 libpng tar -xvzf /tmp/gnu-gs-5.50zlib.tar.gz mv zlib-1.1.3 zlib link X11 cd /usr ln -s X11R6 X11 cd /gs5.50 make it ln -s unix-gcc.mak Makefile make make debug Make a directory under your Ghostscript source directory and go there. mkdir Omni cd Omni Unzip antlr unzip /tmp/antlr-2.7.0.zip cd antlr-2.7.0 [Optional] Make the cpp version of the antlr library cd lib/cpp cp /tmp/Makefile . make cd ../.. Make the mixed (java/cpp) version directory of the Omni driver under antlr and go there. mkdir Omni.mix cd Omni.mix Unzip the current Omni source unzip -a /tmp/Omnixxx.zip (where xxx denotes level) make sure that the library path is set up export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:(your GS dir):(your GS dir)/Omni/antlr-2.7.0/Omni.mix:. make sure that the current directory (.) and the jdk is in the current path. check with echo $PATH set with export PATH=$PATH:.:/usr/jdk118/bin Make it! make After making the files, validate that there are .so files in both the Omni.mix directories and the Epson directory. Apply patch to Ghostscript ** copy patch file into directory to a directory (patch file name is patch.xxx) - where xxx denotes the date or level of patch cd gs5.50 patch < patch.xxx cd .. Build it cd /gs5.50 make clean make make debug Install graphical debugger (optional) cd /tmp rpm -i lesstif-0.90.0-1.i386.rpm rpm -i ddd-3.2-4.i386.rpm 3. Ghostscript/Omni Commands ========================= The following command line options are mandatory when invoking Ghostscript and using the omni print filter. - device: -sDEVICE=omni - printer: -sDeviceName=xxxxxx Note: The device name is one of the printer types contained in the omni filter. The name is similar to Epson_Stylus_Color_860. All other values for the filter can set to predefined defaults in the printer filter. The following are options that can set on the particular printer when invoking Ghostscript. The options that can be set are defined within the devices properties. - form: -sform=FORM_LETTER or -smedia=FORM_A4 - resolution: -sresolution=RESOLUTION_360_X_360 - media: -smedia=MEDIA_GLOSSY - dithering: -sdithering=DITHER_STUCKI_DIFFUSION - tray: -stray=TRAY_MANUAL_FEED - printmode: -sprintmode=PRINT_MODE_MONOCHROME **This value is needed when you want to generate monochrome output instead of 24bit color. 4. Finding device specific features supported =========================================== To find all of the available options are for each device, DeviceTester2 will need to be built and run against the device. This can be built by using the DeviceTester2.mak file. Once DeviceTester2 is built it can be run using the library (libxxx.so) for the device as an input parameter and the available options will be displayed for the user. NOTE: When changing the form size within the omni device, you will need to also set corresponding PAPERSIZE in Ghostscript using the -sPAPERSIZE parameter or the over-ride -g parameters (documented in Ghostscript). 5. Omni color adjustment ===================== We have not verified the color correctness on every device. If you find that the color output on your device is not correct, The color output can be adjusted by changing each of the gammas in the gamma file for the particular device you are using. Before you can change the correct gamma you must first be able to identify each of the following: - printer model - type of dither method applied - matrix or diffusion - printing mode, be it mono, 8, or 24 bit black/black and color - media type If you are working with the Epson Stylus Color 860 you can change the file "Epson Stylus 860 Gammas". The structure defining each of the values in the file are contained in DeviceGammas.hpp. The gamma value can be changed along with the bias value, minimum value needed for each color. Raising any of these values will deplete the color that has been changed. Since the Omni driver supports separate per color plane corrections for each media type, print mode, resolution, and dither mode combination you must modify the line representing your current print options. 6. Adding a Device =============== see file Omni/antlr-2.7.0/Omni.mix/docs/readme 7. Issues, future function and to-do's =================================== - Additional clean up of code - Fix all color dithering algorithms to use a consistent color space conversion. - Add device specific color dithering algorithms. - Implement Ghostscript banding in the Ghostscript render and out of core Omni. - performance improvements - Add support for additional input bitmap support. Currently there is only support for mono and 24bpp output. - Copies function to be added - Stucki Diffusion (default dither) provides the best quality output at this point in time. Using a high quality coated paper should be used when printing high quality image output. Some of the other dithering code that needs completion are: Steinberg Level Smooth HSV Ordered Square Void Cluster - Test Monochrome input files - Add support for six color printers 8. Know problems ============= - Several of the dithering functions do not work at this point in time. We are changing them and resolving issues with inconsistancies between them i.e. magic square or ordered square dithers will produce black output. - Some of the devices may require modifications to the color correction data. - Additional work to be done on the color and dithering implementation