Having quite a bit of experience parsing text files from printer output, some helpful advice:
Quite a few situations can be handled with Monarch (http://www.datawatch.com/), but it is neither cheap (over $500), nor does it work 100% (~90% is more realistic) of the time. I have not used version 9, which is their latest. I would email their sales department and see if you can get a trail if you have interest in going this route. If you have lots of data file and most of it is similar, but different enough that you would need numerous variations of a parsing script, the investment could be well worth it. If you are writing a parsing script by hand, get a text editor that has line and character positions list in it. My personal favorite is Ultra Edit (http://www.ultraedit.com/). Unfortunately it is not free (~$50). I am a programmer by nature, so I would be amiss if I didn't point out that VB.Net (or C#) 2005 Express is free from Microsoft (http://msdn2.microsoft.com/en-us/express/) . Yes, it is one more language to learn, but it's got good documentation and I find its data handling superior to javascript. It will allow you one to make EXE files over scripts. Did I mention it will show line and character position of the file you are in? Sometimes, and only sometimes, Excel can be a good option. If you are a wiz with Excel functions and your data file is line oriented (versus one "record" per page) I would go this route. Output meant for a laser printer frequently has the first "page" contain layout information, showing where data is and is not output. That is your friend. Fields are almost always longer than the data you are using to test with. Make to take that into account. There may be 20 spaces reserved for a piece of information, but your testing data may only use 10 characters. In general assume that data can run up to the point of the next piece of information. It is not uncommon to have a few lines at the front of the file as a header. You will likely need to discard them before you get into the page by page parsing. Depending on the source OS, different characters are used for line breaks. This sometimes causes a problem. The most straight forward way to fix this is to upload, then download, the file from an FTP server in ASCII mode. This will translate for you. Sophisticated text editors will also typically handle this. Cheers. -----Original Message----- From: Brian Ray [mailto:[EMAIL PROTECTED] Sent: Friday, August 31, 2007 6:37 AM To: FusionPro Users Forum Subject: [fusionpro] Re: payment receipts On Aug 30, 2007, at 5:31 PM, [EMAIL PROTECTED] wrote: > I have a work ( a hard work for me ): > Print payment receipts starting from data in .prn archive. > How convert .prn in usable format for fusion pro? .prn is a vague extension indicating something used as a output file. In your case it looks as if it is simply plain text. Probably they are using this for fixed width printing. Its typically out of the scope of FusionPro to convert one output to another. There are others who do this specifically. With that said, one way to hand this case may be to parse the .prn on the fly with JavaScript or ahead of time. Then just feed FusionPro chunks of data while applying a fixed width font. One hard part may be telling where one page starts and another ends. Sometimes datastreams have ASCII character number 12 (AKA formfeed) embedded between pages to help make this distinction. If you must to even more with the data other than print, then your only option will be to write a parser for to try to extract the data. This can be really hard, impossible, and error prone. OTOH, in some cases it works. Better, would be to go back to the source of this file and ask for something else. HTH, Brian Ray +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Calling all FP Web Users! Do you have a question or lots of knowledge to share about FusionPro Web? If so, join our Printable Web to Print Users' Forum today! Send email to [EMAIL PROTECTED] to find out how! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -- Users of FusionPro Desktop have unlimited free email support. Contact Printable Support at [EMAIL PROTECTED] -- View FusionPro Knowledge Base, FusionPro Samples at www.printable.com/vdp/desktop.htm -- You are currently subscribed to fusionpro as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] -- -- Note: All e-mail sent to or from this address will be received or otherwise recorded by the e-mail recipients of this forum. It is subject to archival, monitoring or review by, and/or disclosure to someone other than the recipient. Our privacy policy is posted on www.printplanet.com -- +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- Calling all FP Web Users! Do you have a question or lots of knowledge to share about FusionPro Web? If so, join our Printable Web to Print Users' Forum today! Send email to [EMAIL PROTECTED] to find out how! +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+- -- Users of FusionPro Desktop have unlimited free email support. Contact Printable Support at [EMAIL PROTECTED] -- View FusionPro Knowledge Base, FusionPro Samples at www.printable.com/vdp/desktop.htm -- You are currently subscribed to fusionpro as: [EMAIL PROTECTED] To unsubscribe send a blank email to [EMAIL PROTECTED] -- -- Note: All e-mail sent to or from this address will be received or otherwise recorded by the e-mail recipients of this forum. It is subject to archival, monitoring or review by, and/or disclosure to someone other than the recipient. Our privacy policy is posted on www.printplanet.com --