Commit 00792eae authored by Moritz Lipp's avatar Moritz Lipp

Enable EPUB support

parent f96dd488
......@@ -34,11 +34,9 @@ pdf_document_open(zathura_document_t* document)
const char* password = zathura_document_get_password(document);
fz_try(mupdf_document->ctx){
if (strstr(path, ".xps") != 0 || strstr(path, ".XPS") != 0 || strstr(path, ".rels") != 0) {
mupdf_document->document = (fz_document*) xps_open_document(mupdf_document->ctx, (char*) path);
} else {
mupdf_document->document = (fz_document*) pdf_open_document(mupdf_document->ctx, (char*) path);
}
fz_register_document_handlers(mupdf_document->ctx);
mupdf_document->document = fz_open_document(mupdf_document->ctx, path);
}
fz_catch(mupdf_document->ctx){
error = ZATHURA_ERROR_UNKNOWN;
......
......@@ -32,6 +32,7 @@ ZATHURA_PLUGIN_REGISTER(
register_functions,
ZATHURA_PLUGIN_MIMETYPES({
"application/pdf",
"application/oxps"
"application/oxps",
"application/epub+zip"
})
)
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment