remove print formating from printer output file

I have a print file taken from the print spooler and I want to delete all the formatting leaving only the text. If you vi the file it shows "\304\304 ...." which translates into a printed line on print output.
I need to be able to edit and pass this file to another process
Thnaks

did you try some things like :

strings yourspool >newspool.txt
tr -cd [:print:] <yourspool >newspool.txt
tr -cd [:graph:] <yourspool >newspool.txt

Or some other characheter class (see below) depending on what you want to filter out

                alnum        <alphanumeric characters>
                alpha        <alphabetic characters>
                blank        <whitespace characters>
                cntrl        <control characters>
                digit        <numeric characters>
                graph        <graphic characters>
                ideogram     <ideographic characters>
                lower        <lower-case alphabetic characters>
                phonogram    <phonographic characters>
                print        <printable characters>
                punct        <punctuation characters>
                rune         <valid characters>
                space        <space characters>
                special      <special characters>
                upper        <upper-case characters>
                xdigit       <hexadecimal characters>

(that was on a FreeBSD 8.2-RELEASE-p3)

nroff and pr may help as well.

---------- Post updated at 10:15 PM ---------- Previous update was at 10:14 PM ----------

Removed all graphical and control codes but left the output as one continuos string. any way to keep the line structure

Depends what the file actually is, whether it still contains that structure at all.

the file is capture of a printed invoice (from a cobol prog on sco 5.0.5) i need to clean the file of graphics/formatting, do a new layout and change the tax calcs and then reprint in a pdf format.

Still depends what's actually in the file. Depending on the format, there may not be rawtext left.

there is raw text - currently I cut by line number to a new file before working on the text. The end of line ^m is removed but not the line drawing code.

Could you post or attach an example? Without knowing what must be removed we can't write anything to remove it...

original file from print output - orgfile. formatted output - endfile. It would mkake my life easier if I could get the orgfile clean of all formatting so that process to produce the output would be shortened, The endfile should be in "pdf" format. Thanks

Until someone post something better, here is an hugly piece of try :

tr '\n ' '%&' <origfile.txt | tr -cd '[:graph:]' | tr '%&' '\n ' | egrep -ve '^[[:blank:]]*$' | sed '/DESC/,$s/^[ ][ ]*//'

thanks - nearly there - got "@C3" on first line then "wWE" start of second line - will test again later - thanks for help!