From d64a4eabb26bf6cc05d7de1175edb706117e1207 Mon Sep 17 00:00:00 2001 From: Robin Watts Date: Tue, 11 Oct 2016 21:22:18 +0100 Subject: Bug 696939: Fix mutool info -I flag. When using -I without -X we were not seeing the expected images listed. Adopt the solution suggested by the bug reporter. Many thanks! --- source/tools/pdfinfo.c | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'source') diff --git a/source/tools/pdfinfo.c b/source/tools/pdfinfo.c index fd03db34..edec4217 100644 --- a/source/tools/pdfinfo.c +++ b/source/tools/pdfinfo.c @@ -606,13 +606,17 @@ gatherresourceinfo(fz_context *ctx, globals *glo, int page, pdf_obj *rsrc, int s } xobj = pdf_dict_get(ctx, rsrc, PDF_NAME_XObject); - if (show & XOBJS && xobj) + if (show & (IMAGES|XOBJS) && xobj) { int n; - gatherimages(ctx, glo, page, pageref, xobj); - gatherforms(ctx, glo, page, pageref, xobj); - gatherpsobjs(ctx, glo, page, pageref, xobj); + if (show & IMAGES) + gatherimages(ctx, glo, page, pageref, xobj); + if (show & XOBJS) + { + gatherforms(ctx, glo, page, pageref, xobj); + gatherpsobjs(ctx, glo, page, pageref, xobj); + } n = pdf_dict_len(ctx, xobj); for (i = 0; i < n; i++) { -- cgit v1.2.3