summaryrefslogtreecommitdiff
path: root/include/mupdf/fitz/document.h
diff options
context:
space:
mode:
authorRobin Watts <robin.watts@artifex.com>2017-02-22 16:01:44 +0000
committerRobin Watts <robin.watts@artifex.com>2017-02-23 11:19:00 +0000
commit840ee1d02e7a723e9781d385ed3c6bc853ab5aa7 (patch)
treed4aad6f3d8becf9c82994fd60c9fa77a3206ebf8 /include/mupdf/fitz/document.h
parent6477d336520e3278b56a39c4fd98f220522cb962 (diff)
downloadmupdf-840ee1d02e7a723e9781d385ed3c6bc853ab5aa7.tar.xz
Improve return codes from pdf_authenticate_password.
Customer request to enable finer control based on which password authenticates.
Diffstat (limited to 'include/mupdf/fitz/document.h')
-rw-r--r--include/mupdf/fitz/document.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/include/mupdf/fitz/document.h b/include/mupdf/fitz/document.h
index c66dc2ca..90b54b26 100644
--- a/include/mupdf/fitz/document.h
+++ b/include/mupdf/fitz/document.h
@@ -195,6 +195,15 @@ int fz_needs_password(fz_context *ctx, fz_document *doc);
specifications do not specify any particular text encoding, so
neither do we.
+ Returns 0 for failure to authenticate, non-zero for success.
+
+ For PDF documents, further information can be given by examining
+ the bits in the return code.
+
+ Bit 0 => No password required
+ Bit 1 => User password authenticated
+ Bit 2 => Owner password authenticated
+
Does not throw exceptions.
*/
int fz_authenticate_password(fz_context *ctx, fz_document *doc, const char *password);