diff options
author | Sebastian Rasmussen <sebras@gmail.com> | 2012-01-10 19:44:31 +0100 |
---|---|---|
committer | Sebastian Rasmussen <sebras@gmail.com> | 2012-01-10 19:59:33 +0100 |
commit | 66c961010db971fc7446294938b38843456308bb (patch) | |
tree | 7c369b6cd6af029b3a381edcc98173ca94081a81 /apps | |
parent | 0230a0417212172c391483d054364fb081c79168 (diff) | |
download | mupdf-66c961010db971fc7446294938b38843456308bb.tar.xz |
Automatically load page tree when accessing a page/page count.
Diffstat (limited to 'apps')
-rw-r--r-- | apps/pdfapp.c | 9 | ||||
-rw-r--r-- | apps/pdfclean.c | 3 | ||||
-rw-r--r-- | apps/pdfdraw.c | 9 | ||||
-rw-r--r-- | apps/pdfinfo.c | 1 | ||||
-rw-r--r-- | apps/pdfshow.c | 3 |
5 files changed, 0 insertions, 25 deletions
diff --git a/apps/pdfapp.c b/apps/pdfapp.c index f8c9c79e..053d120d 100644 --- a/apps/pdfapp.c +++ b/apps/pdfapp.c @@ -164,15 +164,6 @@ static void pdfapp_open_pdf(pdfapp_t *app, char *filename, int fd) * Start at first page */ - fz_try(ctx) - { - pdf_load_page_tree(app->xref); - } - fz_catch(ctx) - { - pdfapp_error(app, "cannot load page tree"); - } - app->pagecount = pdf_count_pages(app->xref); app->outline = pdf_load_outline(app->xref); diff --git a/apps/pdfclean.c b/apps/pdfclean.c index f0a33918..2e7aa732 100644 --- a/apps/pdfclean.c +++ b/apps/pdfclean.c @@ -290,9 +290,6 @@ static void retainpages(int argc, char **argv) { fz_obj *oldroot, *root, *pages, *kids, *countobj, *parent, *olddests; - /* Load the old page tree */ - pdf_load_page_tree(xref); - /* Keep only pages/type and (reduced) dest entries to avoid * references to unretained pages */ oldroot = fz_dict_gets(xref->trailer, "Root"); diff --git a/apps/pdfdraw.c b/apps/pdfdraw.c index 91d09c6c..cc125a69 100644 --- a/apps/pdfdraw.c +++ b/apps/pdfdraw.c @@ -455,15 +455,6 @@ int main(int argc, char **argv) fz_throw(ctx, "cannot open document: %s", filename); } - fz_try(ctx) - { - pdf_load_page_tree(xref); - } - fz_catch(ctx) - { - fz_throw(ctx, "cannot load page tree: %s", filename); - } - if (showxml) printf("<document name=\"%s\">\n", filename); diff --git a/apps/pdfinfo.c b/apps/pdfinfo.c index 049e4617..054f0985 100644 --- a/apps/pdfinfo.c +++ b/apps/pdfinfo.c @@ -994,7 +994,6 @@ int main(int argc, char **argv) filename = argv[fz_optind]; printf("%s:\n", filename); xref = pdf_open_xref(ctx, filename, password); - pdf_load_page_tree(xref); pagecount = pdf_count_pages(xref); showglobalinfo(); diff --git a/apps/pdfshow.c b/apps/pdfshow.c index e10e5e08..300da9ca 100644 --- a/apps/pdfshow.c +++ b/apps/pdfshow.c @@ -46,9 +46,6 @@ static void showpagetree(void) if (!xref) fz_throw(ctx, "no file specified"); - if (!xref->page_len) - pdf_load_page_tree(xref); - count = pdf_count_pages(xref); for (i = 0; i < count; i++) { |