![]() |
CAPS Universe documentation
1.0.4
All you need to know to be successful
|
Detect some MIME types of printing documents. More...
Functions | |
| int | detect_mimetype (const char *buf, size_t sz, const char **mimetype) |
Used to assign a corresponding rasterizer.
| int detect_mimetype | ( | const char * | buf, |
| size_t | sz, | ||
| const char ** | mimetype | ||
| ) |
Detect the MIME type of the given header of file content
| [in] | buf | Pointer to files header data |
| [in] | sz | Count of bytes of file data |
| [out] | mimetype | Where to store a pointer to the file's content MIME type |
This function is a wrapper for the CAPS implementation of detecting a few kind of printing document formats. It will be used, if libmagic isn't available or disabled at build-time.
Currently detected printing document formats:
Any leading PJL commands are skipped to detect the real data's MIME format.
If libmagic is available and enabled at build-time, it is used instead. The calling code can continue to use the detect_mimetype() function in this case (another wrapper does the job).