wiki:eCupsScript

Version 4 (modified by psmedley, 16 years ago) ( diff )

--

Starting page of the Postscript Printer Driver (PSCRIPT.DRV) replacement

Source code: in the latest DDK there was the source for the 30.800 PSCRIPT.DRV, looking through the changelogs, it seems that they only have been adding new PPD files, no new functionality.

A binary based on the DDK source can be downloaded from http://download.smedley.info/pscript_30_800.zip

There are 2 main reasons why we want to replace the current postscript driver

  1. It has some serious bugs/limitations which prevent it from working properly with CUPS
  2. To do the auto configuration we need a way to be sure that the printer printing to CUPS is known to CUPS, having our own printer driver greatly simplifies this task, I'll ellaborate on that in the explanation of the eCupsPort driver internals.

Bugs/Limitations

  1. the most important, and luckily most easy to fix bug is the messed up header of the postscript generated by the driver. in the code snippet below you see that the actual postscript marker is below the comment, CUPS expects the postscript marker to be on top to define the stream as postscript. This behaviour is causing that printing on some newer printers directly from OS/2 eComStation fails as well, the printer doesn't recognize the stream as PostScript and therefore ignores it. Some older printer had a 'text mode' fallback where your job was actually printed as source code, but modern printers don't support this anymore, so after receiving the job they simply give a data error or give up without any feedback.
    [{
    %%BeginFeature: Resolution 1200dpi
    << /HWResolution [1200 1200] >> setpagedevice
    %%EndFeature: Resolution
    } stopped cleartomark
    [{
    %%BeginFeature: PageSize A4
    << /PageSize [595 842] /ImagingBBox null >> setpagedevice
    %%EndFeature: PageSize
    } stopped cleartomark
    %!PS-Adobe
    %%Title: Examples.mpb
    %%Creator: Presentation Manager 2.45
    %%CreationDate: 12:09  11/19/2006
    %%DocumentProcSets: PM_1.2
    %%DocumentSuppliedProcSets: PM_1.2
    
  2. PJL Headers, actualy the same effect as above, PJL comments are inserted into the postscript stream if the driver detects that the printer supports mode switching. Again the Postscript marker is not on top. When using CUPS, this mode switching should be done by a filter, and use the PPD with the printer for CUPS processing.
    @PJL ENTER LANGUAGE=PS
    %!PS-Adobe
    %%Title: Examples.mpb
    %%Creator: Presentation Manager 2.45
    %%CreationDate: 12:09  11/19/2006
    %%DocumentProcSets: PM_1.2
    %%DocumentSuppliedProcSets: PM_1.2
    
  3. Font support, there should be a way to support more modern fonts with various toolkits, comments on this are very welcome.
  4. on the fly PPD compilation, just having all your PPDs in a directory and compiling them on the fly would make life a lot easier, not sure if this is supported in the current structure. A alternative might be, automatically compiling new PPD files which are in a specific directory.
Note: See TracWiki for help on using the wiki.