pub unsafe extern "C" fn fz_lookup_metadata(
    ctx: *mut fz_context,
    doc: *mut fz_document,
    key: *const c_char,
    buf: *mut c_char,
    size: c_int
) -> c_int
Expand description

Retrieve document meta data strings.

doc: The document to query.

key: Which meta data key to retrieve…

Basic information: ‘format’ – Document format and version. ‘encryption’ – Description of the encryption used.

From the document information dictionary: ‘info:Title’ ‘info:Author’ ‘info:Subject’ ‘info:Keywords’ ‘info:Creator’ ‘info:Producer’ ‘info:CreationDate’ ‘info:ModDate’

buf: The buffer to hold the results (a nul-terminated UTF-8 string).

size: Size of ‘buf’.

Returns the number of bytes need to store the string plus terminator (will be larger than ‘size’ if the output was truncated), or -1 if the key is not recognized or found.