diff options
author | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 19:50:47 +0200 |
---|---|---|
committer | Tor Andersson <tor.andersson@artifex.com> | 2011-04-03 19:50:47 +0200 |
commit | bc5be11061e7687a80bcda6edc9bf3c136529111 (patch) | |
tree | 4c0c195ad1bf1740ab2c064ca1e3fc5744f808b1 /apps | |
parent | a85b58e0548fb4e45f35bcbb7d0ee6e35bde35b4 (diff) | |
download | mupdf-bc5be11061e7687a80bcda6edc9bf3c136529111.tar.xz |
xps: XPS uses 96 dpi as default where PDF uses 72.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 7 | ||||
-rw-r--r-- | apps/xpsdraw.c | 2 |
2 files changed, 6 insertions, 3 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 332f3bb5..0faff3b3 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -244,7 +244,7 @@ static fz_matrix pdfapp_viewctm(pdfapp_t *app) if (app->xref) ctm = fz_concat(ctm, fz_scale(app->resolution/72.0f, -app->resolution/72.0f)); else - ctm = fz_concat(ctm, fz_scale(app->resolution/72.0f, app->resolution/72.0f)); + ctm = fz_concat(ctm, fz_scale(app->resolution/96.0f, app->resolution/96.0f)); ctm = fz_concat(ctm, fz_rotate(app->rotate + app->page_rotate)); return ctm; } @@ -315,7 +315,10 @@ static void pdfapp_loadpage_xps(pdfapp_t *app) if (!page) pdfapp_error(app, fz_rethrow(-1, "cannot load page %d in file '%s'", app->pageno, app->doctitle)); - app->page_bbox = fz_transformrect(fz_scale(page->width, page->height), fz_unitrect); + app->page_bbox.x0 = 0; + app->page_bbox.y0 = 0; + app->page_bbox.x1 = page->width; + app->page_bbox.y1 = page->height; app->page_rotate = 0; app->page_links = NULL; diff --git a/apps/xpsdraw.c b/apps/xpsdraw.c index 921d677a..a9050a1c 100644 --- a/apps/xpsdraw.c +++ b/apps/xpsdraw.c @@ -155,7 +155,7 @@ static void drawpage(xps_context *ctx, int pagenum) rect.x1 = page->width; rect.y1 = page->height; - zoom = resolution / 72; + zoom = resolution / 96; ctm = fz_translate(0, -page->height); ctm = fz_concat(ctm, fz_scale(zoom, zoom)); bbox = fz_roundrect(fz_transformrect(ctm, rect)); |