summaryrefslogtreecommitdiff
path: root/source
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2015-08-24 10:25:42 +0100
committerRobin Watts <robin.watts@artifex.com>2015-08-24 10:32:49 +0100
commit697f6a7cc3eb4230fcf0825b23125c54cbbe412b (patch)
treec02c3ba60170094225acca96d1c078d92d792d8c /source
parentc4e3a760a5f4c442b4169dbb16e70ee38f1940d2 (diff)
downloadmupdf-697f6a7cc3eb4230fcf0825b23125c54cbbe412b.tar.xz
GProof: Hook up fz_meta - just for 'format' currently.
This will be useful for identifying when we are proofing.
Diffstat (limited to 'source')
-rw-r--r--source/gprf/gprf-doc.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/source/gprf/gprf-doc.c b/source/gprf/gprf-doc.c
index 8536bfc9..0e33e4c3 100644
--- a/source/gprf/gprf-doc.c
+++ b/source/gprf/gprf-doc.c
@@ -783,6 +783,15 @@ gprf_close_document(fz_context *ctx, fz_document *doc_)
fz_free(ctx, doc);
}
+static int
+gprf_lookup_metadata(fz_context *ctx, fz_document *doc, const char *key, char *buf, int size)
+{
+ if (!strcmp(key, "format"))
+ return fz_snprintf(buf, size, "GPROOF");
+
+ return -1;
+}
+
static fz_document *
gprf_open_document_with_stream(fz_context *ctx, fz_stream *file)
{
@@ -792,6 +801,7 @@ gprf_open_document_with_stream(fz_context *ctx, fz_stream *file)
doc->super.close = gprf_close_document;
doc->super.count_pages = gprf_count_pages;
doc->super.load_page = gprf_load_page;
+ doc->super.lookup_metadata = gprf_lookup_metadata;
fz_try(ctx)
{