]> www.fi.muni.cz Git - evince.git/blobdiff - pdf/xpdf/pdfinfo.cc
Compiles at least :)
[evince.git] / pdf / xpdf / pdfinfo.cc
index fae8a182a79b4c22a02a21e86802afda823d4c95..2c183c8385d77f288e8719b93f79a2102d656fcc 100644 (file)
@@ -106,16 +106,23 @@ int main(int argc, char *argv[]) {
   // print page count
   printf("Pages:        %d\n", doc->getNumPages());
 
-  // print encrypted flag
-  printf("Encrypted:    %s\n", doc->isEncrypted() ? "yes" : "no");
+  // print encryption info
+  printf("Encrypted:    ");
+  if (doc->isEncrypted()) {
+    printf("yes (print:%s copy:%s)\n",
+          doc->okToPrint() ? "yes" : "no",
+          doc->okToCopy() ? "yes" : "no");
+  } else {
+    printf("no\n");
+  }
 
   // clean up
   delete doc;
   freeParams();
 
   // check for memory leaks
-  Object::memCheck(errFile);
-  gMemReport(errFile);
+  Object::memCheck(stderr);
+  gMemReport(stderr);
 
   return 0;
 }