All right, I'll cop to being a "dumb VB er", but it's company mandated, not
me.  Anyway, here's how my app works:

A user comes into the site, and makes a request. (Clicks a button saying,
"Gimme a PDF")  This request is added to a DB, and the ASP immediately
returns with a status page for the request.

I have a listening app for each step of our process (XML-FO creation, Image
Retrieval, and rendering).  These apps start up at system start (via a
scheduled task -- I haven't gotten around to making these services yet --
That's for version 2.0), and basically hit the database every few seconds.
When they have a request for their step (denoted by a status field in the
request table -- this field is what's used by the ASP to figure out where
in the process we are/show a link to the finished PDF), they do their part,
and update the status field (to the next step, or to an error code).

The XML-FO creation is pretty straightforward.  I pull info from the DB,
run it through a stylesheet using msxml, and dump out a .fo file to a temp
directory.  The Image retrieval app actually logs on to a web-based DAM
(Digital Asset Management system), and downloads the required image(s),
dumping them to said temp directory.  Finally, the rendering app does the
following steps:
1. Call fop, feeding it the .fo file created in the XML-FO creation step,
and dumping the output to a log file.
2. In a While loop (with a DoEvents (so some work can get done), and a call
to SleepEX (so the processor doesn't get pegged, and I can actually look at
server load) stuck in the middle -- stupid VB), check the log file for
completion or errors.
3. Once it finds a completion flag (or an error) in the log file, it
updates the status flag, so the ASP can tell the render is finished, and
give a link to the finished PDF to the user.

One other thing to note is that this setup allowed me to run multiple
instances of the ImageRetrieval portion of the process (each one processes
a different third of the work load, based on RequestID MOD 3), which
allowed a large queue of requests to get finished more quickly (Image
Retrieval takes about 30 seconds per image -- I would LOVE to have an API
to directly talk to our DAM, but we don't always get what we want.)  This
could probably be extended to run multiple instances of FOP simultaneously,
but you're going to want a LOT of RAM on the box in question.

I hope that helps.  If you need more info, let me know.

-Jeff



                                                                                
                                                               
                    "Matthew                                                    
                                                               
                    Lancashire"           To:     <[EMAIL PROTECTED]>           
                                                         
                    <[EMAIL PROTECTED]       cc:                                
                                                                  
                    es.uk.com>            Subject:     RE: FOP and IIS4/5       
                                                               
                                                                                
                                                               
                    02/10/2003                                                  
                                                               
                    11:23 AM                                                    
                                                               
                    Please respond                                              
                                                               
                    to fop-user                                                 
                                                               
                                                                                
                                                               
                                                                                
                                                               




I have been struggling with this for some time. I have a java class that
will do what I want now I need to integrate it with my IIS server via asp.
Man this java is tough for us dumb VB ers

-----Original Message-----
From: Adam Shelley [mailto:[EMAIL PROTECTED]
Sent: 10 Feb 2003 16:04
To: [EMAIL PROTECTED]
Subject: RE: FOP and IIS4/5


Hello,

I just recently started playing with this approach (calling FOP.bat from
the
web, shelled out).  I noticed that things were taking a while to complete
but it seems to me that It waits for one to finish before it completes the
next.  Is this the case?  Do I need to modify the .bat file so that it can
run multiple instances of the javac program at the same time?  Am I just
crazy?

I would embed this in a java applet or something but I haven't the
slightest
idea on how to get this up and running.  Java is way to foreign for me.

-Adam

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED]
Sent: February 10, 2003 7:55 AM
To: [EMAIL PROTECTED]
Subject: Re: FOP and IIS4/5



Matthew-

I've used FOP (with Sun's JRE, not Microsoft's -- see Oleg's note) with IIS
5 (and I would assume it would work with IIS 4) by basically writing an
ActiveX DLL that shells out to a call to the fop.bat file, and monitors a
log file of the output from the batch file to see when it's finished.

I later broke these steps out, because the render was taking quite a while
(lots of images, which were being pulled from a different server), and
basically wrapped everything with a bunch of VB "listener" apps, which
periodically checked a database of FOP requests.

Also, I believe someone came up with a .NET wrapper for FOP, which should
work under IIS, with the .NET framework installed.  If this interests you,
you might want to hit the archive; I believe the string ".NET" was in the
subject line.  If you want more information about my setup, I'd be happy to
provide it.

-Jeff



                    "Matthew
                    Lancashire"           To:     "Fop-User-Help
\(E-mail\)"
<[EMAIL PROTECTED]>
                    <[EMAIL PROTECTED]       cc:
                    es.uk.com>            Subject:     FOP and IIS4/5

                    02/10/2003
                    10:30 AM
                    Please respond
                    to fop-user






Can Fop be used in Server Side Java on an IIS4/IIS5 server

Matthew Lancashire
IT Project Manager
Intitial Electronic Security Ltd

Tel: +44 1282 473554
Fax: +44 1254 267552


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]






---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to