CUPS has a filter mechanism to detect the format of its input and convert it to a built-in format (PostScript or to a raster image).
CUPS has a database of file names and magic numbers (distinct from the one used by the file
command, but serving a similar purpose and operating on similar principles). It uses this database to construct a transformation chain between the input and a built-in format.
The database is located in /usr/share/cups/mime/
on Arch Linux and Ubuntu; other distributions may use a different path.
If CUPS doesn't recognize the input format, depending on how the filters are set up, it may either assume text or refuse printing. Look for a line containing just application/octet-stream
(with nothing else afterwards) in your filters; if it's present, then unrecognized input is passed to the printer, otherwise it'll be rejected as unprintable.
Note that input that looks like text, for example SVG, will be printed as text in any sane configuration. If your installation has nothing that defines the SVG format, then SVG will be recognized under some generic text rule and printed as is.
There's some good documentation about writing filters on the SuSE wiki.
You should install at least the cups-filters package (formerly by Apple and included in CUPS itself, now maintained by OpenPrinting). There's a package in Arch. This includes a filter for JPEG, but not for SVG.
lpr
is expected to transform files into the representation you want. SVG is text. My question is why the PNG file works at all. – msw Dec 26 '15 at 22:43hplip-3.15.11
is the only CUPS-related package I can think of in my Arch Linux installation. – JosephHarriott Dec 26 '15 at 23:22