Alex Beamish wrote:
What I'm trying to do is come up with scaled page images from a PDF on the fly. Thus, I want to launch Ghostscript and then ask for a couple of page images. So, launching Ghostscript and getting the first page might happen on the first request; subsequent requests would come back to the Ghostscript session left running from the first request, and thus would be able to quickly produce the required page image.

Suggestions welcome.

What you're gonna need is a daemon that lives outside of mod_perl. It's job will be to answer ghost script requests made from within your mod_perl handler, track open files, purge unused files, and generally do all the things you want to do. I don't really see a clean way to do it otherwise.

I've never used it, but doing a CPAN search revealed GSAPI, a perl GhostScript interface. That might be a good place to go.


Good luck,

Rob

Reply via email to