diff options
author | Robin Watts <robin.watts@artifex.com> | 2012-02-01 15:06:55 +0000 |
---|---|---|
committer | Robin Watts <robin@ghostscript.com> | 2012-02-02 00:16:48 +0000 |
commit | 4ab5924753d32b5eaeb80138c6626057f61b516f (patch) | |
tree | d60def29f688c36ca474c5b06221d58ee82268db /apps | |
parent | 16c575d5b9fb0ce4488cac07d2b09ccbcaaf95c9 (diff) | |
download | mupdf-4ab5924753d32b5eaeb80138c6626057f61b516f.tar.xz |
Work on supporting links in xps documents.
Currently, this only works with local links.
When running the page, check for NavigateUri entries; if found,
and that page is not already marked as having resolved it's links,
add a new link entry to doc->current_page links. When the page
finishes running, mark the page as having resolved it's links.
This avoids the links being generated multiple times.
Update the mupdf viewer to use these links - but only AFTER the
page has been run.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index 48e9fe93..aa529220 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -367,7 +367,6 @@ static void pdfapp_loadpage_xps(pdfapp_t *app) } app->page_bbox = xps_bound_page(app->xps, page); - app->page_links = NULL; /* Create display list */ app->page_list = fz_new_display_list(app->ctx); @@ -375,6 +374,8 @@ static void pdfapp_loadpage_xps(pdfapp_t *app) xps_run_page(app->xps, page, mdev, fz_identity, NULL); fz_free_device(mdev); + app->page_links = page->links; + xps_free_page(app->xps, page); } |