Simplify PDFium by removing code that's not used in the open source repo.
[pdfium.git] / samples / pdfium_test.cc
index 7436e9d..9cdc4a7 100644 (file)
@@ -16,6 +16,7 @@
 #include "../fpdfsdk/include/fpdfformfill.h"
 #include "../fpdfsdk/include/fpdftext.h"
 #include "../fpdfsdk/include/fpdfview.h"
+#include "../core/include/fxcrt/fx_system.h"
 #include "v8/include/v8.h"
 
 #ifdef _WIN32
@@ -289,7 +290,7 @@ void RenderPdf(const char* name, const char* pBuf, size_t len,
   (void) FPDF_GetDocPermissions(doc);
   (void) FPDFAvail_IsFormAvail(pdf_avail, &hints);
 
-  FPDF_FORMHANDLE form = FPDFDOC_InitFormFillEnviroument(doc, &form_callbacks);
+  FPDF_FORMHANDLE form = FPDFDOC_InitFormFillEnvironment(doc, &form_callbacks);
   FPDF_SetFormFieldHighlightColor(form, 0, 0xFFE4DD);
   FPDF_SetFormFieldHighlightAlpha(form, 100);
 
@@ -355,12 +356,12 @@ void RenderPdf(const char* name, const char* pBuf, size_t len,
   }
 
   FORM_DoDocumentAAction(form, FPDFDOC_AACTION_WC);
-  FPDFDOC_ExitFormFillEnviroument(form);
+  FPDFDOC_ExitFormFillEnvironment(form);
   FPDF_CloseDocument(doc);
   FPDFAvail_Destroy(pdf_avail);
 
-  printf("Loaded, parsed and rendered %d pages.\n", rendered_pages);
-  printf("Skipped %d bad pages.\n", bad_pages);
+  printf("Loaded, parsed and rendered %" PRIuS " pages.\n", rendered_pages);
+  printf("Skipped %" PRIuS " bad pages.\n", bad_pages);
 }
 
 int main(int argc, const char* argv[]) {
@@ -377,7 +378,7 @@ int main(int argc, const char* argv[]) {
     return 1;
   }
 
-  FPDF_InitLibrary(NULL);
+  FPDF_InitLibrary();
 
   UNSUPPORT_INFO unsuppored_info;
   memset(&unsuppored_info, '\0', sizeof(unsuppored_info));