aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorJay Berkenbilt <ejb@ql.org>2009-09-27 22:05:38 +0200
committerJay Berkenbilt <ejb@ql.org>2009-09-27 22:05:38 +0200
commit8d7bb3ff50943fa51ac1d968930bd23071376904 (patch)
tree8667d6782295c92b960d1c2a613640daa463eac8 /include
parent40f4b1ef5237a51b38b74b04d53d6aa20819b5d7 (diff)
downloadqpdf-8d7bb3ff50943fa51ac1d968930bd23071376904.tar.zst
add methods for getting encryption data
git-svn-id: svn+q:///qpdf/trunk@733 71b93d88-0707-0410-a8cf-f5a4172ac649
Diffstat (limited to 'include')
-rw-r--r--include/qpdf/QPDF.hh23
-rw-r--r--include/qpdf/qpdf-c.h19
2 files changed, 42 insertions, 0 deletions
diff --git a/include/qpdf/QPDF.hh b/include/qpdf/QPDF.hh
index 1a5ed649..34e0842c 100644
--- a/include/qpdf/QPDF.hh
+++ b/include/qpdf/QPDF.hh
@@ -128,6 +128,29 @@ class QPDF
DLL_EXPORT
bool isEncrypted() const;
+ DLL_EXPORT
+ bool isEncrypted(int& R, int& P);
+
+ // Encryption permissions -- not enforced by QPDF
+ DLL_EXPORT
+ bool allowAccessibility();
+ DLL_EXPORT
+ bool allowExtractAll();
+ DLL_EXPORT
+ bool allowPrintLowRes();
+ DLL_EXPORT
+ bool allowPrintHighRes();
+ DLL_EXPORT
+ bool allowModifyAssembly();
+ DLL_EXPORT
+ bool allowModifyForm();
+ DLL_EXPORT
+ bool allowModifyAnnotation();
+ DLL_EXPORT
+ bool allowModifyOther();
+ DLL_EXPORT
+ bool allowModifyAll();
+
// Helper function to trim padding from user password. Calling
// trim_user_password on the result of getPaddedUserPassword gives
// getTrimmedUserPassword's result.
diff --git a/include/qpdf/qpdf-c.h b/include/qpdf/qpdf-c.h
index 2f0096f5..11dae4f1 100644
--- a/include/qpdf/qpdf-c.h
+++ b/include/qpdf/qpdf-c.h
@@ -161,6 +161,25 @@ extern "C" {
DLL_EXPORT
QPDF_BOOL qpdf_is_encrypted(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_accessibility(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_extract_all(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_print_low_res(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_print_high_res(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_modify_assembly(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_modify_form(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_modify_annotation(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_modify_other(qpdf_data qpdf);
+ DLL_EXPORT
+ QPDF_BOOL qpdf_allow_modify_all(qpdf_data qpdf);
+
/* WRITE FUNCTIONS */
/* Set up for writing. No writing is actually performed until the