Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
pwmt
zathura
Commits
14fbe0f7
Commit
14fbe0f7
authored
Dec 27, 2010
by
Moritz Lipp
Browse files
Render ddjvu document
parent
14d744be
Changes
1
Hide whitespace changes
Inline
Side-by-side
ft/djvu/djvu.c
View file @
14fbe0f7
...
...
@@ -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
);
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment