Re: Loading postscript file

As far as I know (but perhaps someone else knows better) the only freely
available postscript interpreter is ghostscript (which is used by gv).
Ghostscript is distributed under the GPL license which prevents Gtk, which
is distributed under the LGPL, to depend on it. The easiest way round this
is simply to run system() ghostscript as a subprocess and have it output a
raster file, e.g. in the pnm format, and then load this file into your gtk

Here is the command line I've been using for this in the past:

gs -q -dNOPAUSE -g100x200 -r75x75 -sDEVICE=ppmraw -sOutputFile=foo.pgm

where encodes of the shift and rotation of the file

Hope this helps.


On Mon, Dec 27, 2010 at 05:10, tengfei <tfcolin gmail com> wrote:

Hello all.

I want to render a postscript file (as gv does) in a Gtk+ program. I
tried the image widget by the function gtk_image_new_from_file, but it
didn't work. Can anyone help regarding this?



gtk-app-devel-list mailing list
gtk-app-devel-list gnome org

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]