1

I would like to build a cross-platform GUI application in Python that displays PostScript files I generate, among some other stuff. What is the best way to accomplish this? Ideally I would be able to do things like zoom and pan the displayed graphic.

Do any/some/all of the GUI toolkits have something I can drop in to do this, and if so what are they called and how do they work? If necessary, I can convert the postscript file to PDF or a raster format behind the scenes, but I'd rather not do the latter.

2 Answers 2

1

I asked pretty much the same question a little time ago. Here it is. Hope it helps.

Note: Poppler is highly undocumented. If you use Gtk for your GUI there are a few working examples. In Qt things are a little harder, and I haven't figured out a way myself yet.

2
  • Thanks for the input and link. Before posting this I tried to look for information on using poppler and hoped that someone could point out a good example or documentation to help with doing what I want to. I am kind of surprised I cannot find a drop-in solution for this, even at the C level. Mar 29, 2010 at 20:07
  • The surprise is mutual, in fact I started a new question asking for examples, which you can find at the following url: stackoverflow.com/questions/2507498/… . The latter also links to the only two examples I found so far in the net.
    – japs
    Mar 30, 2010 at 16:31
1

In a word Ghostscript. It's been a while since I used it, but it's cross-platform and you can use it to generate image files which your app could then display, pan, and zoom. I used it to develop and test some pretty involved commercial Postscript code for my own products and under contract for others. It's open source, which came in handy for a couple of use cases I had. Nowdays I believe it does PDF, too.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.