Re: Loading postscript file
- From: Dov Grobgeld <dov grobgeld gmail com>
- To: tengfei <tfcolin gmail com>
- Cc: gtk-app-devel <gtk-app-devel-list gnome org>
- Subject: Re: Loading postscript file
- Date: Mon, 27 Dec 2010 08:47:38 +0200
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
trans.ps myfile.ps quit.ps
where trans.ps encodes of the shift and rotation of the file myfile.ps
Hope this helps.
On Mon, Dec 27, 2010 at 05:10, tengfei <tfcolin gmail com> wrote:
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
] [Thread Prev