Keith Yohn
Keith Yohn

Reputation: 65

Pass data between webpage and VB application

I am developing an application for internal use in our company. The purpose of this application is for document imaging. What we are wanting to do is print a barcode label to attach to documents so that when they are scanned in a piece of software such as vfiler will be able to read the barcodes and know how to file them.

The main focus is our ERP system which is web based (PHP). We are wanting to modify the code to allow the user to print the barcode label immediately once they enter an order or PO. I have access to the source code for the ERP web pages. I don't know of any way to make a web page print to a printer without displaying the printer select dialog. So, I decided that I wanted to try and create a VB application that would do the printing of the barcodes. This would allow me to bypass the the printer select dialog.

Now for the question. Is there any way to have a web page (PHP) running on the server call a VB app to perform a task? So, if I had a button on the webpage and the user clicked it, that button would somehow send the pertinent information (Order number) to the VB app and the VB app would print the barcode. The VB app will always be running on the machine. The label printers will be Zebra USB label printers on each person's machine.

Any thoughts appreciated.

Thanks, Keith

Upvotes: 0

Views: 465

Answers (3)

user3025227
user3025227

Reputation: 3

It seems an old question but maybe this answer would help someone else. It would be much easier to implement this with a command line app. Just pass the necessary parameters into the exe file with PHP exec().

exec("barcodePrint.exe -barcodeValue");

Upvotes: 0

jfrankcarr
jfrankcarr

Reputation: 481

The way I implemented something like this was to have an Windows service, running on a different system from the webserver, watching the upload folders on the web server, then moving the files to the appropriate location for further processing. I tracked the movement of files through the system by creating an initial record upon a success upload, then creating a transaction record for each activity afterward (printed, faxed, emailed, sent for manual review, etc). This insured a reportaable audit trail for each document and helped identify 'orphan' files that would happen sometimes.

The important thing with a service like this is making sure that you've configured security properly so that the service has access to resources like printers and network drives.

Upvotes: 1

Marcus
Marcus

Reputation: 5457

You could make the VB app a service, then implement a FileSystemWatcher on a specific folder. When the user clicks the Print button, all the webpage does is save a file with the necessary info to the folder that is being watched.

Upvotes: 0

Related Questions