There and back again: printconf and file types
We are doing business with a vendor, eVisions, which has a product called FormFusion or FormsFusion. Their product generates output suitable for printers to parse. The only problem is, printconf on Red Hat Advanced Server 2.1 thinks that FormFusion output is "ASCII text (with escape sequences)," and our PostScript print queues happily render the data into line-noise.
Printing in RHAS 2.1 is a combination of LPRng (for /etc/printcap, lpd, lpr, etc.), "magicfilter," and--as appropriate for all complex technologies--m4. Magicfilter uses a file(1)-LIKE method for guessing how to render output. The trick is, Magicfilter does not actually use file's magic file ("/usr/share/magic.mgc", a file compiled from "/usr/share/magic" via "file -C"), it uses "/usr/share/printconf/mf.magic".
Magicfilter also refuses to correctly identify files under a certain size, a variable I did not know in testing.
So, by adding a line with the proper characters to "/usr/share/printconf/magic", Magicfilter can identify our data as "FormsFusion print data". By creating a file called "/usr/share/printconf/mf_rules/mf01-formsfusion" with the line "/FormsFusion/ cat", FormsFusion data is forced to be outputted immediately for all printers.
This knowledge is all useless as of RHEL3, when as far as I understand CUPS requires a completely new trick to force the right MIME type and thus the right processing of various proprietary formats.
And thus ends my first foray into Linux printer administration. <shudders>