I have a vb program called from a cobol program running on unix. I need the vb program to run on a remote server instead of the local users machine. Any suggestions?
You got it ...because we are printing a whole directory of PDFs (could be as many as 100), we need a way to print a batch of PDF files quickly. If we just print using using reader, won't a new reader open for each PDF?
Hope was to use the APIs in the Standard version of Acrobat. The cobol program is the order entry process running on unix... the PDFs are the MSDS files requested by the customer. We have to print the order and MSDS files togeter. Cobol program creates a temp directory, fills it with the required PDF files and does a shell command to execute the vb program (if the vb program runs on the server where acrobat lives... all works great) and waits for VB program to delete one file in the temp directory. When the one file is gone, the cobol program deletes the temp directory and returns control to the user. Trying to minimize user impact and interaction. Each piece is working perfect.... just not together.
we created a bat file to run the VB program on the remote server. When tested on the remote server, it works fine. Using RCMD to execute the bat file from the locale computer gives us errors (482 print error for txt file printing and runtime error for adobe acrobat). What are we missing???
hmmm... not sure what you are missing. It may be the context that it is running in. Meaning does it have the rights to do these actions.
Look up COM/DCOM on the web or in almost any programming book that you have or even the help files for VB. This is what you may want to do.
You may also want to create a service on the server in question and have it configurable to look at the directory(ies) in question every so often (or use FindFirstChangeNotification or similar API, search this site for code by strongm I belive it was who posted it not too long ago) and if it finds files of the correct format (PDF) it knows what to do.
the BAT file runs the VB program that uses the Acrobat APIs.
We may have solved our problem with a $50 program on the web that will monitor the directory or run on a command line to print the PDFs and use Adobe reader instead of the Standard version of Adobe Acrobat. As a side note, I have had customer issues with Adobe for years. The reader version 4.0 had APIs for printing, but Adobe took them out to force their customer to buy a full version. Had a similar problem with them when I upgrade PCs and the had discontinued (did not know they discontinued it until I called) Type-On-Call and wanted us to pay for fonts we had already purchase again. Fortunately for us, there are ways around Adobe's marketing tactics.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.