Use WindowsPrintMode in more places in place of ints.

Move WindowsPrintMode assertion into CPSPrinterDriver.

Change-Id: I570076b43751e052c5396e89a6674b83a4ad1a1e
Reviewed-on: https://pdfium-review.googlesource.com/31298
Reviewed-by: Rebekah Potter <rbpotter@chromium.org>
Reviewed-by: dsinclair <dsinclair@chromium.org>
Commit-Queue: Lei Zhang <thestig@chromium.org>
diff --git a/fpdfsdk/fpdf_view.cpp b/fpdfsdk/fpdf_view.cpp
index d21448b..60be46b 100644
--- a/fpdfsdk/fpdf_view.cpp
+++ b/fpdfsdk/fpdf_view.cpp
@@ -212,7 +212,7 @@
 FPDF_EXPORT FPDF_BOOL FPDF_CALLCONV FPDF_SetPrintMode(int mode) {
   if (mode < FPDF_PRINTMODE_EMF || mode > FPDF_PRINTMODE_POSTSCRIPT3)
     return FALSE;
-  g_pdfium_print_mode = mode;
+  g_pdfium_print_mode = static_cast<WindowsPrintMode>(mode);
   return TRUE;
 }
 #endif  // defined(_WIN32)