What is the mos primitive way to output a file to the printer?
Send it to the device node that the printer is hooked to
cat file.ps > /dev/ulpt0
You will have to have permissions to access that usb printer device node.
But what if I want to send some control chars.
Then you'll need something that will do that like printf,
printf "This is a test\r\n\f" | cat > /dev/ulpt0
CUPS, LPR, a PCl filter, etc.
Or you could echo the character you want to the device node. You can write a shell script to automate that perhaps.
Why don't you post what you are trying to achieve and someone might be able to direct you.
If you are trying to access a printer, make carriage returns, line feeds, so that the document prints correctly,
That's what a print driver, a PCL filter that calls upon ghostscript, or sending the document in the same printer language that the printer understands does.
If you cat a .txt file to a PCL printer without a filter the txt will be all mixed up. Sounds like you already know that and are trying to make a print filter or printer driver for a particular printer language?
Just simply making a text file with control characters in the text won't give you what you want I don't think.