[gs-devel] JNI Interface to GhostScript
Russell Lang
gsview at ghostgum.com.au
Wed Mar 20 13:56:38 PST 2002
Jim,
RedMon is a Windows printer port monitor. If you write to
the printer, it will redirect to stdin of a program which
can be Ghostscript. This does involve starting a
Ghostscript process for each job, but keeps the
configuration separate from your program.
Note that processing PDF requires random access to the
file, so you will need to either tell Ghostscript to read
the file from the local file system, or use one of the
RedMon tools to write a temporary file then call
Ghostscript.
http://www.cs.wisc.edu/~ghost/redmon/
> This sounds like what I want to do. Now the big question: How do I do this
> under Windows?
>
> Jim
>
> > -----Original Message-----
> > From: Stefan Kemper [mailto:stefan at artifex.com]
> > Sent: Wednesday, March 20, 2002 10:00 AM
> > To: Jim Urban
> > Cc: GhostScript
> > Subject: Re: [gs-devel] JNI Interface to GhostScript
> >
> >
> >
> >
> > Jim Urban wrote:
> > >
> > > > you can start up one process and feed it mulitiple files
> > > This would mean waiting for multiple files to accumulate. This
> > is not an
> > > option. The files must print as soon as they are created as
> > these files are
> > > medical reports which are needed by physicians.
> > >
> > > Let me ask this, is there a way I can start GhostScript like a
> > service or
> > > daemon which would keep running and wait for me to "send" it
> > files to print?
> >
> > Yes, this is one of the most common ways GhostScript runs, a print
> > server on a unix box connected to a pcl printer given postscipt/pdf
> > input.
> >
> > Take a look at gs/doc/Unix-lpr.htm
> >
> > Stefan
> >
> > > Thanks,
> > > Jim
> > >
> > > > -----Original Message-----
> > > > From: Stefan Kemper [mailto:stefan at artifex.com]
> > > > Sent: Wednesday, March 20, 2002 9:31 AM
> > > > To: Jim Urban
> > > > Cc: GhostScript
> > > > Subject: Re: [gs-devel] JNI Interface to GhostScript
> > > >
> > > >
> > > > Jim,
> > > >
> > > > At the moment there is no JNI interface for Ghostscript. I would
> > > > recommend the process route. If you are worried about starting up
> > > > Ghostscript a few thousand times a day you can start up one
> > process and
> > > > feed it mulitiple files, more efficent for a little more work.
> > > >
> > > > Regards,
> > > > Stefan Kemper
> > > > Artifex Software
> > > >
> > > > Jim Urban wrote:
> > > > >
> > > > > I have a Java application which runs constantly. It wakes up
> > > > every so often
> > > > > reads a database and generates PDF files. A client has
> > asked that the
> > > > > application automatically print a copy of each PDF file after it is
> > > > > generated. This seams like a natural use for GhostScript.
> > > > This brings me
> > > > > to my question: Has anyone written a JNI (Java Native Interface) to
> > > > > GhostScript? I know I can start a separate process for
> > GhostScript, but
> > > > > given that this application produces a couple thousand PDF
> > > > files a day, I
> > > > > would rather execute GhostScript within my Java process.
> > > > >
> > > > > Thanks,
> > > > >
> > > > > Jim Urban
> > > > > Product Manager
> > > > > Netsteps Inc.
> > > > > Suite 505E
> > > > > 1 Pierce Pl.
> > > > > Itasca, IL 60143
> > > > > Voice: (630) 250-3045 x2164
> > > > > Fax: (630) 250-3046
> > > > >
> > > > > _______________________________________________
> > > > > gs-devel mailing list
> > > > > gs-devel at ghostscript.com
> > > > > http://www.ghostscript.com/mailman/listinfo/gs-devel
> > > >
> >
>
> _______________________________________________
> gs-devel mailing list
> gs-devel at ghostscript.com
> http://www.ghostscript.com/mailman/listinfo/gs-devel
Russell Lang gsview at ghostgum.com.au
Ghostgum Software Pty Ltd http://www.ghostgum.com.au/
More information about the gs-devel
mailing list