summaryrefslogtreecommitdiff
path: root/apps/mupdfshow.c
diff options
context:
space:
mode:
Diffstat (limited to 'apps/mupdfshow.c')
-rw-r--r--apps/mupdfshow.c31
1 files changed, 15 insertions, 16 deletions
diff --git a/apps/mupdfshow.c b/apps/mupdfshow.c
index 8dcdd17d..70ca7a62 100644
--- a/apps/mupdfshow.c
+++ b/apps/mupdfshow.c
@@ -2,8 +2,7 @@
* pdfshow -- the ultimate pdf debugging tool
*/
-#include "fitz.h"
-#include "mupdf.h"
+#include "mupdf-internal.h"
static pdf_document *doc = NULL;
static fz_context *ctx = NULL;
@@ -25,7 +24,7 @@ static void showtrailer(void)
if (!doc)
fz_throw(ctx, "no file specified");
printf("trailer\n");
- fz_debug_obj(doc->trailer);
+ pdf_print_obj(doc->trailer);
printf("\n");
}
@@ -33,13 +32,13 @@ static void showxref(void)
{
if (!doc)
fz_throw(ctx, "no file specified");
- pdf_debug_xref(doc);
+ pdf_print_xref(doc);
printf("\n");
}
static void showpagetree(void)
{
- fz_obj *ref;
+ pdf_obj *ref;
int count;
int i;
@@ -50,7 +49,7 @@ static void showpagetree(void)
for (i = 0; i < count; i++)
{
ref = doc->page_refs[i];
- printf("page %d = %d %d R\n", i + 1, fz_to_num(ref), fz_to_gen(ref));
+ printf("page %d = %d %d R\n", i + 1, pdf_to_num(ref), pdf_to_gen(ref));
}
printf("\n");
}
@@ -107,7 +106,7 @@ static void showstream(int num, int gen)
static void showobject(int num, int gen)
{
- fz_obj *obj;
+ pdf_obj *obj;
if (!doc)
fz_throw(ctx, "no file specified");
@@ -123,7 +122,7 @@ static void showobject(int num, int gen)
else
{
printf("%d %d obj\n", num, gen);
- fz_debug_obj(obj);
+ pdf_print_obj(obj);
printf("stream\n");
showstream(num, gen);
printf("endstream\n");
@@ -133,19 +132,19 @@ static void showobject(int num, int gen)
else
{
printf("%d %d obj\n", num, gen);
- fz_debug_obj(obj);
+ pdf_print_obj(obj);
printf("endobj\n\n");
}
- fz_drop_obj(obj);
+ pdf_drop_obj(obj);
}
static void showgrep(char *filename)
{
- fz_obj *obj;
+ pdf_obj *obj;
int i;
- for (i = 0; i < doc->len; i++)
+ for (i = 0; i < pdf_count_objects(doc); i++)
{
if (doc->table[i].type == 'n' || doc->table[i].type == 'o')
{
@@ -159,17 +158,17 @@ static void showgrep(char *filename)
continue;
}
- fz_sort_dict(obj);
+ pdf_sort_dict(obj);
printf("%s:%d: ", filename, i);
- fz_fprint_obj(stdout, obj, 1);
+ pdf_fprint_obj(stdout, obj, 1);
- fz_drop_obj(obj);
+ pdf_drop_obj(obj);
}
}
printf("%s:trailer: ", filename);
- fz_fprint_obj(stdout, doc->trailer, 1);
+ pdf_fprint_obj(stdout, doc->trailer, 1);
}
#ifdef MUPDF_COMBINED_EXE