I have a web project that tracks warehouse inventory. THey want to be able to print barcodes for scanning. I wanted to originally generate the file and write it to the client's HD and if possible raise the print dialog automatically to print them. They do high volume so I need this to be as streamline as possible.
Before anyone chimes in with "Malicious malware", save your breath please.
I found this post on a forum :
There are valid and legitimate reasons for wanting to write to the visitors harddrive. However, the only secure and acceptable method of doing so is to use server-side code to send an HTTP attachment to the browser and let the browser raise the Save As dialog box to ask the visitor where they would like to write the file. At that point, of course, the visitor has the right to refuse the file altogether.
I would be fine with this. If I can take a file, generate it and have the save as dialog pop up automatically, giving them the ability to save it to their HD that would be fine. How do I do this? At this point I can generate a text or html file for this purpose. But I do not know how to send an HTTP attachment to the browser and let the browser raise the Save As dialog box. I am using php FYI.
If you have a better approach that does not involve a bunch of extra steps for the user, I am all ears. If I can not do this, then I will be forced to write the file on the server, then have a program running on the client's machine checking for files on the server. I would rather not have to do this. Again they want this functionality and it is an internal application so they are aware of the security issues.
Thank you for any help with this.