diff options
author | Robin Watts <Robin.Watts@artifex.com> | 2017-06-03 21:25:52 -0700 |
---|---|---|
committer | Robin Watts <Robin.Watts@artifex.com> | 2017-06-03 21:25:52 -0700 |
commit | ac99be0eb766433e6f0bb6275b3e23791e7b7204 (patch) | |
tree | 9a6cba5b2251ece14e74691c369be691b014f377 /include | |
parent | 565624dd5c042de4ddf95be251d4cd011e9460d0 (diff) | |
download | mupdf-ac99be0eb766433e6f0bb6275b3e23791e7b7204.tar.xz |
Add pdf_keep_document.
We have pdf_drop_document, so a pdf_keep_document seems justified
too.
Diffstat (limited to 'include')
-rw-r--r-- | include/mupdf/pdf/document.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/include/mupdf/pdf/document.h b/include/mupdf/pdf/document.h index 177f947c..68303f05 100644 --- a/include/mupdf/pdf/document.h +++ b/include/mupdf/pdf/document.h @@ -96,6 +96,13 @@ pdf_document *pdf_open_document_with_stream(fz_context *ctx, fz_stream *file); void pdf_drop_document(fz_context *ctx, pdf_document *doc); /* + pdf_keep_document: Keep a reference to an open document. + + Does not throw exceptions. +*/ +pdf_document *pdf_keep_document(fz_context *ctx, pdf_document *doc); + +/* pdf_specifics: down-cast a fz_document to a pdf_document. Returns NULL if underlying document is not PDF */ |