mirror of
https://git.pwmt.org/pwmt/zathura.git
synced 2024-12-28 21:55:59 +01:00
Render ddjvu document
This commit is contained in:
parent
14d744befe
commit
14fbe0f72e
1 changed files with 19 additions and 0 deletions
|
@ -56,6 +56,23 @@ djvu_document_open(zathura_document_t* document)
|
|||
goto error_free;
|
||||
}
|
||||
|
||||
/* load document info */
|
||||
ddjvu_message_t* msg;
|
||||
ddjvu_message_wait(djvu_document->context);
|
||||
|
||||
while((msg = ddjvu_message_peek(djvu_document->context)) && (msg->m_any.tag != DDJVU_DOCINFO)) {
|
||||
if(msg->m_any.tag == DDJVU_ERROR) {
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
ddjvu_message_pop(djvu_document->context);
|
||||
}
|
||||
|
||||
/* decoding error */
|
||||
if(ddjvu_document_decoding_error(djvu_document->document)) {
|
||||
goto error_free;
|
||||
}
|
||||
|
||||
document->number_of_pages = ddjvu_document_get_pagenum(djvu_document->document);
|
||||
|
||||
return true;
|
||||
|
@ -150,6 +167,8 @@ djvu_page_get(zathura_document_t* document, unsigned int page)
|
|||
return NULL;
|
||||
}
|
||||
|
||||
while(!ddjvu_page_decoding_done(document_page->data));
|
||||
|
||||
document_page->width = ddjvu_page_get_width(document_page->data);
|
||||
document_page->height = ddjvu_page_get_width(document_page->data);
|
||||
|
||||
|
|
Loading…
Reference in a new issue