Synchronously creates a #EvDocument for the document from @stream; or, if no
backend handling the document's type is found, or an error occurred
on opening the document, returns %NULL and fills in @error.
If the document is encrypted, it is returned but also @error is set to
%EV_DOCUMENT_ERROR_ENCRYPTED.
If @mime_type is non-%NULL, this overrides any type inferred from the stream.
If the mime type cannot be inferred from the stream, and @mime_type is %NULL,
an error is returned.
Synchronously creates a #EvDocument for the document from @stream; or, if no backend handling the document's type is found, or an error occurred on opening the document, returns %NULL and fills in @error. If the document is encrypted, it is returned but also @error is set to %EV_DOCUMENT_ERROR_ENCRYPTED.
If @mime_type is non-%NULL, this overrides any type inferred from the stream. If the mime type cannot be inferred from the stream, and @mime_type is %NULL, an error is returned.