summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
Diffstat (limited to 'source')
-rw-r--r--source/html/handler.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/source/html/handler.c b/source/html/handler.c
index c3f9c3df..cbce9409 100644
--- a/source/html/handler.c
+++ b/source/html/handler.c
@@ -1,5 +1,8 @@
#include "mupdf/html.h"
+#define DEFW (450)
+#define DEFH (600)
+
void
html_close_document(html_document *doc)
{
@@ -12,7 +15,7 @@ html_count_pages(html_document *doc)
{
int count;
- if (!doc->box) html_layout_document(doc, 400, 400);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH);
count = ceilf(doc->box->h / doc->page_h);
printf("count pages! %g / %g = %d\n", doc->box->h, doc->page_h, count);
@@ -23,7 +26,7 @@ html_page *
html_load_page(html_document *doc, int number)
{
printf("load page %d\n", number);
- if (!doc->box) html_layout_document(doc, 400, 400);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH);
return (void*)((intptr_t)number + 1);
}
@@ -35,7 +38,7 @@ html_free_page(html_document *doc, html_page *page)
fz_rect *
html_bound_page(html_document *doc, html_page *page, fz_rect *bbox)
{
- if (!doc->box) html_layout_document(doc, 400, 400);
+ if (!doc->box) html_layout_document(doc, DEFW, DEFH);
printf("html: bound page\n");
bbox->x0 = bbox->y0 = 0;
bbox->x1 = doc->page_w;