[gs-devel] GhostScript PS to a Bitmap Objecto conversion
Russell Lang
gsview at ghostgum.com.au
Sun Jul 22 02:02:49 PDT 2007
Ralph wrote:
> On Sat, Jul 21, 2007 at 02:21:55PM -0400, Daniel Antonio Peraza Cedrez wrote:
>
> > Hi, I'm looking for a Qt wiget that allows me to display LaTeX
> > formulae parsed from a Text Field. I have not found any results yet.
> > Now I am thinking to write my own, and my basic idea is to use LaTeX
> > compiler to write a PostScript file with the parsed TeX fomula, and
> > then convert it to any Bitmap-like object, instead of an image file.
>
> Yes, Ghostscript can certainly to this, although properly cropping
> formulae so the whitespace is correct can be difficult. You can
> call Ghostscript from a shell to convert a ps file to a png or other
> bitmap, or do it in memory from the shared library build.
>
> See http://ghostscript.com/doc/current/API.htm for an overview of the
> second method.
Which ever of these methods you eventually use, I suggest you implement
calling ghostscript from the shell first. You need to figure out the commands
for ghostscript first, and it's much easier to do the testing from the command
line. Once you've got it working, you may find it works well enough that it
isn't worth the time to try the API method.
More information about the gs-devel
mailing list