summaryrefslogtreecommitdiff
path: root/docs/example.c
diff options
context:
space:
mode:
Diffstat (limited to 'docs/example.c')
-rw-r--r--docs/example.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/docs/example.c b/docs/example.c
index cf7d0176..660d394b 100644
--- a/docs/example.c
+++ b/docs/example.c
@@ -3,7 +3,7 @@
// Compile a debug build of mupdf, then compile and run this example:
//
// gcc -g -o build/debug/example -Iinclude docs/example.c \
-// build/debug/libmupdf.a build/debug/libmupdf-js-none.a \
+// build/debug/libmupdf.a \
// build/debug/libfreetype.a build/debug/libjbig2dec.a \
// build/debug/libjpeg.a build/debug/libopenjpeg.a \
// build/debug/libz.a -lm
@@ -20,6 +20,10 @@ render(char *filename, int pagenumber, int zoom, int rotation)
fz_context *ctx = fz_new_context(NULL, NULL, FZ_STORE_UNLIMITED);
+ // Register the default file types.
+
+ fz_register_document_handlers(ctx);
+
// Open the PDF, XPS or CBZ document.
fz_document *doc = fz_open_document(ctx, filename);