+ while (ddjvu_document_get_pageinfo(djvu_document->d_document, page, &info) < DDJVU_JOB_OK) {
+ ddjvu_message_wait (djvu_document->d_context);
+ ddjvu_message_pop (djvu_document->d_context);
+ }
+
+ if (djvu_document->orientation == EV_ORIENTATION_PORTRAIT ||
+ djvu_document->orientation == EV_ORIENTATION_UPSIDEDOWN) {
+ *width = info.width * SCALE_FACTOR;
+ *height = info.height * SCALE_FACTOR;
+ } else {
+ *width = info.height * SCALE_FACTOR;
+ *height = info.width * SCALE_FACTOR;
+ }
+}