Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1095)

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 589813002: Add FPDF_GetSecurityHandlerRevision (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Created 6 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « fpdfsdk/include/fpdfview.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: fpdfsdk/src/fpdfview.cpp
diff --git a/fpdfsdk/src/fpdfview.cpp b/fpdfsdk/src/fpdfview.cpp
index 70494e02a2fd24eed1156d30197a09b8792416af..49dabe300b4d43038f0308447f014747460d260a 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -340,6 +340,17 @@ DLLEXPORT unsigned long STDCALL FPDF_GetDocPermissions(FPDF_DOCUMENT document)
return pDict->GetInteger("P");
}
+DLLEXPORT int STDCALL FPDF_GetSecurityHandlerRevision(FPDF_DOCUMENT document)
+{
+ if (document == NULL) return -1;
+ CPDF_Document*pDoc = (CPDF_Document*)document;
+ CPDF_Parser* pParser = (CPDF_Parser*)pDoc->GetParser();
+ CPDF_Dictionary* pDict = pParser->GetEncryptDict();
+ if (pDict == NULL) return -1;
+
+ return pDict->GetInteger("R");
+}
+
DLLEXPORT int STDCALL FPDF_GetPageCount(FPDF_DOCUMENT document)
{
if (document == NULL) return 0;
« no previous file with comments | « fpdfsdk/include/fpdfview.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698