[poppler] poppler/XRef.cc
Albert Astals Cid
aacid at kemper.freedesktop.org
Tue Jun 1 13:40:38 PDT 2010
poppler/XRef.cc | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)
New commits:
commit 41e9af7f505dbfbda36f6ac97df90f2a42ab3160
Author: Albert Astals Cid <aacid at kde.org>
Date: Tue Jun 1 21:40:07 2010 +0100
If the document is not encrypted it is ok to print
diff --git a/poppler/XRef.cc b/poppler/XRef.cc
index 8ce370c..1e60575 100644
--- a/poppler/XRef.cc
+++ b/poppler/XRef.cc
@@ -897,13 +897,17 @@ GBool XRef::okToPrint(GBool ignoreOwnerPW) {
// 2 (and we are allowed to print at all), or with security handler rev
// 3 and we are allowed to print, and bit 12 is set.
GBool XRef::okToPrintHighRes(GBool ignoreOwnerPW) {
- if (2 == encRevision) {
- return (okToPrint(ignoreOwnerPW));
- } else if (encRevision >= 3) {
- return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint));
+ if (encrypted) {
+ if (2 == encRevision) {
+ return (okToPrint(ignoreOwnerPW));
+ } else if (encRevision >= 3) {
+ return (okToPrint(ignoreOwnerPW) && (permFlags & permHighResPrint));
+ } else {
+ // something weird - unknown security handler version
+ return gFalse;
+ }
} else {
- // something weird - unknown security handler version
- return gFalse;
+ return gTrue;
}
}
More information about the poppler
mailing list