[gs-devel] ghostscript output devices
Ralph Giles
ralph.giles at artifex.com
Wed Apr 2 07:56:41 PST 2003
On Wednesday, April 2, 2003, at 02:35 pm, Andreas Volz wrote:
> I looked at the availavle devices (gs -h) , but I've seen no device
> that
> fits my requirements. Are there patches or newer versions of
> ghostscript
> which support one of these devices?
Not that I'm aware of.
> If not, what could I do it? Is it a good solution to get images from gs
> and display them on the desired device? Other ideas...?
Yes, that's reasonable. There are actually quite a few ways to go about
it. The simplest is just to use one of the existing image file devices
to rasterize a file in a separate process and either cache the file on
disk or pipe it to a display application. If you use one of the p*mraw
devices, this can be reasonably fast. Please see Use.htm in the
documentation for information on the gs commandline to use.
You can also your own output device supporting any of the above display
APIs. See Devices.htm and gdev*.c in the source for examples. I
wouldn't suggest this unless you need 'gs' to function generically with
these devices for others. The device api is somewhat complicated, and
we're trying to reduce the number of output devices in general.
The best option if you need speed or integration is to build
ghostscript as a library and use the gsapi_* interface to rasterize
files. This is intended for viewer application clients, and avoids the
overhead of pipes or interprocess communication.
Finally, you could write a ijs (www.linuxprinting.org/ijs/) driver.
This interface is intended mostly to simplify separate packaging of
printer drivers, so it would mostly be a because-you-can option. :)
Hope those pointers are some help,
-r
More information about the gs-devel
mailing list