diff options
author | Robin Watts <robin.watts@artifex.com> | 2015-08-24 10:25:42 +0100 |
---|---|---|
committer | Robin Watts <robin.watts@artifex.com> | 2015-08-24 10:32:49 +0100 |
commit | 697f6a7cc3eb4230fcf0825b23125c54cbbe412b (patch) | |
tree | c02c3ba60170094225acca96d1c078d92d792d8c /source/gprf/gprf-doc.c | |
parent | c4e3a760a5f4c442b4169dbb16e70ee38f1940d2 (diff) | |
download | mupdf-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/gprf/gprf-doc.c')
-rw-r--r-- | source/gprf/gprf-doc.c | 10 |
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) { |