Click here to Skip to main content
15,883,933 members
Please Sign up or sign in to vote.
2.00/5 (1 vote)
See more:
Hi as simple as the subject state, I need to read a prn file that is tryied to be printed from a legacy application, also I can do the print to XPS or print to PDF, mut I need then to "understand" the file in order to populate a data grid. any codes? thanks in advance!
Posted

1 solution

The short answer is it depends on the formating. Here are some links that should help:

http://www.frogmorecs.com/arts/what-is-a-prn-file[^]

...if its a PostScript file you can use this:
http://pages.cs.wisc.edu/~ghost/gsview/[^]
 
Share this answer
 
v2
Comments
Sergey Alexandrovich Kryukov 1-Feb-13 20:00pm    
That's correct, a 5.
Generally, it's not designed for "reading". This is what is sent to a printer on a low level, and therefore is totally hardware-dependent.
—SA
topogigio1979 1-Feb-13 20:23pm    
may be I misexplain the issue... I need to get a PRN file and READ it on VB and place the data into ms data grid or txtboxes.so I need something that can open the file read it parse it and place the information on the txts, got it? thanks anyway for the information provided
BC @ CV 4-Feb-13 9:08am    
As SA explained above its totally hardware dependent. So the best you can do is to Google the name of your printer & PRN. If you need this to work for all printers you are looking at a near impossible feat, you might consider if there is a more reasonable way to accomplish whatever it is you are trying to accomplish. BTW what is the reason for your needing to read a PRN file in a form?
topogigio1979 4-Feb-13 10:04am    
HI thanks a lot for the reply, I need to capture the information from a legacy system, so I can print as XPS, print as PDF or print to file ( PRN ) whatever is the file output, the issue is that I need to read the file ( like an Excel spreadsheet) got the idea? hope you can help
BC @ CV 4-Feb-13 12:11pm    
If possible, I would try to get the data from the legacy system before it goes to the printer and then create a PDF by either using RDLCs or some third party library like itextsharp.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900