How to automatically import prn files to db

October 12, 2010 at 19:17:00
Specs: Windows 2000
I work for a lumber mill. We have 2 ripsaws that are each hooked to a computer that records the amount of wood ran and so on. At the end of the day each saw prints out a tally of the wood ripped and the sizes ripped. I would like to combine both printouts into one. I want it to tell what each saw has ran then give a total for both saws. Both computers are networked together and the software on both computers saves the printout to .prn files that are ready for a database. It would be nice to save the totals for each day into a database but for now I would like a way to combine the printouts into one. Since both computers save the printout in a .prn file is their any program I can use to automatically combine the files and use selected data from each .prn file? It doesnt need to do this automatically on a schedule but rather when I start the program that will make the printout I desire.

See More: How to automatically import prn files to db

October 18, 2010 at 22:21:33
Well, normally a .prn is a postscript encapsulated document - so you could convert it to a PDF or something...combining the reports is possible, you just need to make sure it's valid postscript.

As for storing the data in a DB, it's already plaintext (if it's postscript), so you'd just need a script to parse the data & make SQL inserts (or whatever your flavor). Shell scripting and/or some perl could get this done easily.

Report •
Related Solutions

Ask Question