 diff --git a/pdf/pdf.cc b/pdf/pdf.cc
-index 7aba412..246cd81 100644
+index 7aba412..f57902a 100644
 --- a/pdf/pdf.cc
 +++ b/pdf/pdf.cc
-@@ -81,21 +81,26 @@ const void* PPP_GetInterface(const char* interface_name) {
+@@ -81,7 +81,13 @@ const void* PPP_GetInterface(const char* interface_name) {
    return pp::Module::Get()->GetPluginInterface(interface_name);
  }
  

       'dependencies': [
         '../base/base.gyp:base',
         '../components/components.gyp:ui_zoom',
@@ -17,6 +17,9 @@
         '../third_party/pdfium/pdfium.gyp:pdfium',
       ],
       'ldflags': [ '-L<(PRODUCT_DIR)',],
+      'defines': [
+        'PDF_IMPLEMENTATION',
+      ],
       'sources': [
         'button.h',
         'button.cc',
diff --git a/pdf/pdf.h b/pdf/pdf.h
index 37e72e5..37e7112 100644
--- a/pdf/pdf.h
+++ b/pdf/pdf.h
@@ -5,6 +5,22 @@
 #ifndef PDF_PDF_H_
 #define PDF_PDF_H_
 
+#if defined(WIN32)
+
+#if defined(PDF_IMPLEMENTATION)
+#define PDF_EXPORT __declspec(dllexport)
+#define PDF_EXPORT_PRIVATE __declspec(dllexport)
+#else
+#define PDF_EXPORT __declspec(dllimport)
+#define PDF_EXPORT_PRIVATE __declspec(dllimport)
+#endif  // defined(PDF_IMPLEMENTATION)
+
+#else
+#define PDF_EXPORT
+#define PDF_EXPORT_PRIVATE
+#endif
+
+
 #include "ppapi/c/ppb.h"
 #include "ppapi/cpp/module.h"
 
@@ -25,6 +41,7 @@ int PPP_InitializeModule(PP_Module module_id,
 void PPP_ShutdownModule();
 const void* PPP_GetInterface(const char* interface_name);
 

+extern "C" {
+
 #if defined(OS_WIN)
+PDF_EXPORT
 bool RenderPDFPageToDC(const void* pdf_buffer,
                                  int buffer_size,
                                  int page_number,
@@ -118,6 +124,7 @@ bool RenderPDFPageToDC(const void* pdf_buffer,
 
 #endif  // OS_WIN
 
+PDF_EXPORT
 bool GetPDFDocInfo(const void* pdf_buffer,
                    int buffer_size, int* page_count,
                    double* max_page_width) {
@@ -176,4 +183,4 @@ bool RenderPDFPageToBitmap(const void* pdf_buffer,
   return ret;
 }
 
-}  // namespace chrome_pdf
+}
diff --git a/pdf/pdf.gyp b/pdf/pdf.gyp
index f47e33a..19864bb 100644
--- a/pdf/pdf.gyp
+++ b/pdf/pdf.gyp
@@ -6,7 +6,7 @@
