OK,
I've already got the .jar file running. It will work from the command prompt on the server computer. What the .jar does is use several variables that are passed to it to create a new pdf that's stamped with information from the database.
A hard coded example of the command line looks like this:
location of java remains hard coded and so does the location of wfstamp.jar. The location of the P:\ file is a variable and so is the "52104-150-951.pdf" and "released" which are passed from the clients browser.
So, I was using a version of the code that Steve Wood helped me out with the other day to pass my variables into an .a5w page with a url. The url is
The "Open_Stamped.a5w" page looks like this currently:
Anyway, I think my problem may be that the sys_shell_wait doesn't work in the web environment. How do I get this to run on the webserver? Do I have to do something with an ajax callback? What I'm attempting to do is let the user view/download one of our drawings but it must be stamped with the information in case they print it as part of our ISO procedure.
Any help would be appreciated.
I've already got the .jar file running. It will work from the command prompt on the server computer. What the .jar does is use several variables that are passed to it to create a new pdf that's stamped with information from the database.
A hard coded example of the command line looks like this:
Code:
c:\windows\system32\java.exe -jar c:\A5Webroot\wfstamp.jar P:\Secured\ReleasedPDF\Workflow\DAVID\N\00006081.pdf C:\A5Webroot\DBW_Downloads\52104-150-951.pdf ADH released
So, I was using a version of the code that Steve Wood helped me out with the other day to pass my variables into an .a5w page with a url. The url is
Code:
Open_Stamped.a5w?fileloc={File_location}&dnum={dnumber}&status={Status}
Code:
dim fileloc AS c dim status AS c dim dnum AS c dim outfile AS c openfile = fileloc if file.exists(openfile) = .f. ?"<script>alert('file not found');</script>" else outfile = "C:\A5Webroot\DBW_Downloads"+chr(92)+dnum+".pdf" 'msgbox("Attempting to Open",filelocation) 'Run pdf creation 'minimized = .f.' and wait until finished sys_shell_wait("java -jar C:\MVWorks\wfstamp.jar "+quote(fileloc)+" "+outfile+" "+quote(status),.f.) response.sendfile(outfile,.t.) end if%>
Any help would be appreciated.
Comment