diff options
Diffstat (limited to 'source/tools/pdfpages.c')
-rw-r--r-- | source/tools/pdfpages.c | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/source/tools/pdfpages.c b/source/tools/pdfpages.c index 62aa4eeb..cb6a6a2d 100644 --- a/source/tools/pdfpages.c +++ b/source/tools/pdfpages.c @@ -66,7 +66,6 @@ shownum(fz_context *ctx, fz_output *out, pdf_obj *page, char *text, pdf_obj *nam static int showpage(fz_context *ctx, pdf_document *doc, fz_output *out, int page) { - pdf_obj *pageobj; pdf_obj *pageref; int failed = 0; @@ -74,9 +73,7 @@ showpage(fz_context *ctx, pdf_document *doc, fz_output *out, int page) fz_try(ctx) { pageref = pdf_lookup_page_obj(ctx, doc, page-1); - pageobj = pdf_resolve_indirect(ctx, pageref); - - if (!pageobj) + if (!pageref) fz_throw(ctx, FZ_ERROR_GENERIC, "cannot retrieve info from page %d", page); } fz_catch(ctx) @@ -87,13 +84,13 @@ showpage(fz_context *ctx, pdf_document *doc, fz_output *out, int page) if (!failed) { - failed |= showbox(ctx, out, pageobj, "MediaBox", PDF_NAME_MediaBox); - failed |= showbox(ctx, out, pageobj, "CropBox", PDF_NAME_CropBox); - failed |= showbox(ctx, out, pageobj, "ArtBox", PDF_NAME_ArtBox); - failed |= showbox(ctx, out, pageobj, "BleedBox", PDF_NAME_BleedBox); - failed |= showbox(ctx, out, pageobj, "TrimBox", PDF_NAME_TrimBox); - failed |= shownum(ctx, out, pageobj, "Rotate", PDF_NAME_Rotate); - failed |= shownum(ctx, out, pageobj, "UserUnit", PDF_NAME_UserUnit); + failed |= showbox(ctx, out, pageref, "MediaBox", PDF_NAME_MediaBox); + failed |= showbox(ctx, out, pageref, "CropBox", PDF_NAME_CropBox); + failed |= showbox(ctx, out, pageref, "ArtBox", PDF_NAME_ArtBox); + failed |= showbox(ctx, out, pageref, "BleedBox", PDF_NAME_BleedBox); + failed |= showbox(ctx, out, pageref, "TrimBox", PDF_NAME_TrimBox); + failed |= shownum(ctx, out, pageref, "Rotate", PDF_NAME_Rotate); + failed |= shownum(ctx, out, pageref, "UserUnit", PDF_NAME_UserUnit); } fz_printf(ctx, out, "</page>\n"); |