[riscos-printing] Re: How to write a printer dumper to work with Gutenprint

  • From: Martin Wuerthner <lists@xxxxxxxxxxxxxxx>
  • To: riscos-printing@xxxxxxxxxxxxx
  • Date: Sat, 22 Jan 2022 20:24:03 +0100

David Higton <dave@xxxxxxxxxxxxxxxx> wrote:

Hello everybody,

My, this is a low traffic list these days.  Anyway...

I'm trying to write a printer dumper to work with Gutenprint and to
support IPP (and maybe eventually Airprint too), but I'm a bit stuck at
the moment because I don't know what printer driver module to register the
dumper with.

Gutenprint has a module task called PDriverGP.  Is that the printer driver
that I need to register my dumper with?  If so, what's its number?

That question is a bit confusing. There is no PDriverGP module task, just
PDumperGP, and that module is a dumper that registers with PDriverDP, the
standard RISC OS raster driver. You cannot register any dumpers with
Gutenprint. If you want to write another dumper that registers with
PDriverDP, then that is a standard RISC OS task that has nothing to do with
Gutenprint.

That said, PDumperGP allows you to plug in different backends, not just the
GPDriver backend that contains the actual Gutenprint code. At some stage I
did create one that uses Ghostscript to create the printer data instead of
Gutenprint, but that was more of a proof of concept than a serious project.
Basically, what happens is that PDumperGP creates a job file with all the
raster data and then calls the backend executable specified in the Printer
Definition File to output the printer data to the current print job. If you
wanted to do that, you could look at the GPDriver sources (which are open
source).

The question is what kind of data you would want to send to the printer via
IPP/AirPrint. If you wanted vector data, then you would need to piggyback
onto the PostScript driver similar to Steve Fryatt's PrintPDF and then send
a PDF file to the printer.

PDumperGP could help you if you wanted to send a raster image to the printer
and you did not want to write your own dumper module to get the raster data
from PDriverDP. Your backend would then have to encode the raster job into
the desired image format and wrap it into the IPP job structure, and
obviously the Connection of the printer would have to be set up in such a
way that the job file is sent to the printer. Maybe it might also work to
piggyback onto David Pilling's SPrinter, which gives you a proper RISC OS
sprite instead of the compressed raster data you get from PDumperGP.

Regards,
Martin
-- 
------------------------------------------------------------------------
Martin Wuerthner           MW Software        http://www.mw-software.com
------------------------------------------------------------------------
------------------------------------------------------------
    To change, suspend or cancel your subscription go to
       //www.freelists.org/list/riscos-printing
------------------------------------------------------------

Other related posts: