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

Unified Diff: fpdfsdk/src/fpdfview.cpp

Issue 345123002: Add support to extract viewer preference (Closed) Base URL: https://pdfium.googlesource.com/pdfium.git@master
Patch Set: Added more getters Created 6 years, 6 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
« core/include/fpdfdoc/fpdf_doc.h ('K') | « 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 a5ba796158705184300e27a699a48ce64c4b02f6..d440e119f5815a597993f9d536081b8b3a33e464 100644
--- a/fpdfsdk/src/fpdfview.cpp
+++ b/fpdfsdk/src/fpdfview.cpp
@@ -863,9 +863,36 @@ DLLEXPORT FPDF_BOOL STDCALL FPDF_VIEWERREF_GetPrintScaling(FPDF_DOCUMENT documen
CPDF_Document* pDoc = (CPDF_Document*)document;
if (!pDoc) return TRUE;
CPDF_ViewerPreferences viewRef(pDoc);
+
Vitaly Buka (NO REVIEWS) 2014/06/24 21:53:46 please remove this empty line
Nikhil 2014/06/25 09:09:47 Done.
return viewRef.PrintScaling();
}
+DLLEXPORT int STDCALL FPDF_VIEWERREF_GetNumCopies(FPDF_DOCUMENT document)
+{
+ CPDF_Document* pDoc = (CPDF_Document*)document;
+ if (!pDoc) return TRUE;
+ CPDF_ViewerPreferences viewRef(pDoc);
+ return viewRef.NumCopies();
+}
+
+DLLEXPORT FPDF_PAGERANGE STDCALL FPDF_VIEWERREF_GetPrintPageRange(FPDF_DOCUMENT document)
+{
+ CPDF_Document* pDoc = (CPDF_Document*)document;
+ if (!pDoc) return NULL;
+ CPDF_ViewerPreferences viewRef(pDoc);
+ return viewRef.PrintPageRange();
+}
+
+DLLEXPORT FPDF_BYTESTRING STDCALL FPDF_VIEWERREF_GetDuplex(FPDF_DOCUMENT document)
+{
+ CPDF_Document* pDoc = (CPDF_Document*)document;
+ FPDF_BYTESTRING duplex;
+ if (!pDoc) return duplex;
+ CPDF_ViewerPreferences viewRef(pDoc);
+ duplex = viewRef.Duplex();
+ return duplex;
+}
+
DLLEXPORT FPDF_DEST STDCALL FPDF_GetNamedDestByName(FPDF_DOCUMENT document,FPDF_BYTESTRING name)
{
if (document == NULL)
« core/include/fpdfdoc/fpdf_doc.h ('K') | « fpdfsdk/include/fpdfview.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698