glib/CMakeLists.txt              |    3 +
 glib/poppler-action.h            |    6 ++
 glib/poppler-annot.h             |   68 +++++++++++++++++++++++++++++++++
 glib/poppler-attachment.h        |    3 +
 glib/poppler-date.h              |    3 +
 glib/poppler-document.h          |   80 +++++++++++++++++++++++++++++++++++++++
 glib/poppler-enums.h.template    |    3 +
 glib/poppler-form-field.h        |   33 ++++++++++++++++
 glib/poppler-layer.h             |    7 +++
 glib/poppler-macros.h            |   33 ++++++++++++++++
 glib/poppler-media.h             |    6 ++
 glib/poppler-movie.h             |    5 ++
 glib/poppler-page.h              |   78 ++++++++++++++++++++++++++++++++++++++
 glib/poppler-structure-element.h |   72 +++++++++++++++++++++++++++++++++++
 glib/poppler.h                   |    5 ++
 test/CMakeLists.txt              |    8 +++
 16 files changed, 412 insertions(+), 1 deletion(-)

New commits:
commit 4ef2020d036c5b6b11040be2e2685746434778e5
Author: Christian Persch <[email protected]>
Date:   Fri Oct 19 22:46:15 2018 +0200

    glib: Only export symbols in the public API
    
    poppler-glib exported lots of internal C++ symbols
    that are not in the public API, nor have any ABI
    guarantees.
    
    Mark all public functions with POPPLER_PUBLIC, and
    use symbol visibility to hide everything else.

diff --git a/glib/CMakeLists.txt b/glib/CMakeLists.txt
index 33c66082..3fd2a751 100644
--- a/glib/CMakeLists.txt
+++ b/glib/CMakeLists.txt
@@ -86,6 +86,9 @@ set(poppler_glib_generated_SRCS
 )
 add_library(poppler-glib ${poppler_glib_SRCS} ${poppler_glib_generated_SRCS})
 set_target_properties(poppler-glib PROPERTIES VERSION 8.9.0 SOVERSION 8)
+set_target_properties(poppler-glib PROPERTIES C_VISIBILITY_PRESET hidden)
+set_target_properties(poppler-glib PROPERTIES CXX_VISIBILITY_PRESET hidden)
+set_target_properties(poppler-glib PROPERTIES VISIBILITY_INLINES_HIDDEN 1)
 if(MINGW)
     get_target_property(POPPLER_GLIB_SOVERSION poppler-glib SOVERSION)
     set_target_properties(poppler-glib PROPERTIES SUFFIX 
"-${POPPLER_GLIB_SOVERSION}${CMAKE_SHARED_LIBRARY_SUFFIX}")
diff --git a/glib/poppler-action.h b/glib/poppler-action.h
index 2a5d7f83..13468f79 100644
--- a/glib/poppler-action.h
+++ b/glib/poppler-action.h
@@ -299,16 +299,22 @@ union _PopplerAction
 #define POPPLER_TYPE_ACTION             (poppler_action_get_type ())
 #define POPPLER_ACTION(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
POPPLER_TYPE_ACTION, PopplerAction))
 
+POPPLER_PUBLIC
 GType          poppler_action_get_type (void) G_GNUC_CONST;
 
+POPPLER_PUBLIC
 void           poppler_action_free     (PopplerAction *action);
+POPPLER_PUBLIC
 PopplerAction *poppler_action_copy     (PopplerAction *action);
 
 
 #define POPPLER_TYPE_DEST              (poppler_dest_get_type ())
+POPPLER_PUBLIC
 GType          poppler_dest_get_type   (void) G_GNUC_CONST;
 
+POPPLER_PUBLIC
 void           poppler_dest_free       (PopplerDest   *dest);
+POPPLER_PUBLIC
 PopplerDest   *poppler_dest_copy       (PopplerDest   *dest);
 
 G_END_DECLS
diff --git a/glib/poppler-annot.h b/glib/poppler-annot.h
index 44ab5e3d..336f9977 100644
--- a/glib/poppler-annot.h
+++ b/glib/poppler-annot.h
@@ -170,127 +170,195 @@ struct _PopplerAnnotCalloutLine
   gdouble  y3;
 };
 
+POPPLER_PUBLIC
 GType                         poppler_annot_get_type                           
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnotType              poppler_annot_get_annot_type                     
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_get_contents                       
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_set_contents                       
(PopplerAnnot *poppler_annot,
                                                                                
const gchar  *contents);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_get_name                           
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_get_modified                       
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 PopplerAnnotFlag              poppler_annot_get_flags                          
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_set_flags                          
(PopplerAnnot *poppler_annot,
                                                                                
PopplerAnnotFlag flags);
+POPPLER_PUBLIC
 PopplerColor                 *poppler_annot_get_color                          
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_set_color                          
(PopplerAnnot *poppler_annot,
                                                                                
PopplerColor *poppler_color);
+POPPLER_PUBLIC
 gint                          poppler_annot_get_page_index                     
(PopplerAnnot *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_get_rectangle                      
(PopplerAnnot     *poppler_annot,
                                                                                
PopplerRectangle *poppler_rect);
+POPPLER_PUBLIC
 void                          poppler_annot_set_rectangle                      
(PopplerAnnot     *poppler_annot,
                                                                                
PopplerRectangle *poppler_rect);
 
 /* PopplerAnnotMarkup */
+POPPLER_PUBLIC
 GType                         poppler_annot_markup_get_type                    
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 gchar                        *poppler_annot_markup_get_label                   
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_markup_set_label                   
(PopplerAnnotMarkup *poppler_annot,
                                                                                
const gchar        *label);
+POPPLER_PUBLIC
 gboolean                      poppler_annot_markup_has_popup                   
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_markup_set_popup                   
(PopplerAnnotMarkup *poppler_annot,
                                                                                
PopplerRectangle   *popup_rect);
+POPPLER_PUBLIC
 gboolean                      poppler_annot_markup_get_popup_is_open           
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_markup_set_popup_is_open           
(PopplerAnnotMarkup *poppler_annot,
                                                                                
gboolean            is_open);
+POPPLER_PUBLIC
 gboolean                      poppler_annot_markup_get_popup_rectangle         
(PopplerAnnotMarkup *poppler_annot,
                                                                                
PopplerRectangle   *poppler_rect);
+POPPLER_PUBLIC
 void                          poppler_annot_markup_set_popup_rectangle         
(PopplerAnnotMarkup *poppler_annot,
                                                                                
 PopplerRectangle   *poppler_rect);
+POPPLER_PUBLIC
 gdouble                       poppler_annot_markup_get_opacity                 
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_markup_set_opacity                 
(PopplerAnnotMarkup *poppler_annot,
                                                                                
gdouble             opacity);
+POPPLER_PUBLIC
 GDate                        *poppler_annot_markup_get_date                    
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_markup_get_subject                 
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 PopplerAnnotMarkupReplyType   poppler_annot_markup_get_reply_to                
(PopplerAnnotMarkup *poppler_annot);
+POPPLER_PUBLIC
 PopplerAnnotExternalDataType  poppler_annot_markup_get_external_data           
(PopplerAnnotMarkup *poppler_annot);
 
 /* PopplerAnnotText */
+POPPLER_PUBLIC
 GType                         poppler_annot_text_get_type                      
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_text_new                           
(PopplerDocument  *doc,
                                                                                
PopplerRectangle *rect);
+POPPLER_PUBLIC
 gboolean                      poppler_annot_text_get_is_open                   
(PopplerAnnotText *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_text_set_is_open                   
(PopplerAnnotText *poppler_annot,
                                                                                
gboolean          is_open);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_text_get_icon                      
(PopplerAnnotText *poppler_annot);
+POPPLER_PUBLIC
 void                          poppler_annot_text_set_icon                      
(PopplerAnnotText *poppler_annot,
                                                                                
const gchar      *icon);
+POPPLER_PUBLIC
 PopplerAnnotTextState         poppler_annot_text_get_state                     
(PopplerAnnotText *poppler_annot);
 
 /* PopplerAnnotTextMarkup */
+POPPLER_PUBLIC
 GType                         poppler_annot_text_markup_get_type               
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_text_markup_new_highlight          
(PopplerDocument  *doc,
                                                                                
 PopplerRectangle *rect,
                                                                                
 GArray           *quadrilaterals);
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_text_markup_new_squiggly           
(PopplerDocument  *doc,
                                                                                
 PopplerRectangle *rect,
                                                                                
 GArray           *quadrilaterals);
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_text_markup_new_strikeout          
(PopplerDocument  *doc,
                                                                                
 PopplerRectangle *rect,
                                                                                
 GArray           *quadrilaterals);
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_text_markup_new_underline          
(PopplerDocument  *doc,
                                                                                
 PopplerRectangle *rect,
                                                                                
 GArray           *quadrilaterals);
+POPPLER_PUBLIC
 void                          poppler_annot_text_markup_set_quadrilaterals     
(PopplerAnnotTextMarkup *poppler_annot,
                                                                                
GArray                 *quadrilaterals);
+POPPLER_PUBLIC
 GArray                       *poppler_annot_text_markup_get_quadrilaterals     
(PopplerAnnotTextMarkup *poppler_annot);
 
 /* PopplerAnnotFreeText */
+POPPLER_PUBLIC
 GType                         poppler_annot_free_text_get_type                 
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnotFreeTextQuadding  poppler_annot_free_text_get_quadding             
(PopplerAnnotFreeText *poppler_annot);
+POPPLER_PUBLIC
 PopplerAnnotCalloutLine      *poppler_annot_free_text_get_callout_line         
(PopplerAnnotFreeText *poppler_annot);
 
 /* PopplerAnnotFileAttachment */
+POPPLER_PUBLIC
 GType                         poppler_annot_file_attachment_get_type           
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAttachment            *poppler_annot_file_attachment_get_attachment     
(PopplerAnnotFileAttachment *poppler_annot);
+POPPLER_PUBLIC
 gchar                        *poppler_annot_file_attachment_get_name           
(PopplerAnnotFileAttachment *poppler_annot);
 
 /* PopplerAnnotMovie */
+POPPLER_PUBLIC
 GType                         poppler_annot_movie_get_type                     
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 gchar                        *poppler_annot_movie_get_title                    
(PopplerAnnotMovie *poppler_annot);
+POPPLER_PUBLIC
 PopplerMovie                 *poppler_annot_movie_get_movie                    
(PopplerAnnotMovie *poppler_annot);
 
 /* PopplerAnnotScreen */
+POPPLER_PUBLIC
 GType                         poppler_annot_screen_get_type                    
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAction                *poppler_annot_screen_get_action                  
(PopplerAnnotScreen *poppler_annot);
 
 /* PopplerAnnotLine */
+POPPLER_PUBLIC
 GType                         poppler_annot_line_get_type                      
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_line_new                           
(PopplerDocument  *doc,
                                                                                
 PopplerRectangle *rect,
                                                                                
 PopplerPoint     *start,
                                                                                
 PopplerPoint     *end);
+POPPLER_PUBLIC
 void                          poppler_annot_line_set_vertices                  
(PopplerAnnotLine *poppler_annot,
                                                                                
PopplerPoint     *start,
                                                                                
PopplerPoint     *end);
 
 /* PopplerAnnotCalloutLine */
+POPPLER_PUBLIC
 GType                         poppler_annot_callout_line_get_type              
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnotCalloutLine      *poppler_annot_callout_line_new                   
(void);
+POPPLER_PUBLIC
 PopplerAnnotCalloutLine      *poppler_annot_callout_line_copy                  
(PopplerAnnotCalloutLine *callout);
+POPPLER_PUBLIC
 void                          poppler_annot_callout_line_free                  
(PopplerAnnotCalloutLine *callout);
 
 /* PopplerAnnotCircle */
+POPPLER_PUBLIC
 GType                         poppler_annot_circle_get_type                    
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_circle_new                         
(PopplerDocument    *doc,
                                                                                
 PopplerRectangle   *rect);
+POPPLER_PUBLIC
 void                          poppler_annot_circle_set_interior_color          
(PopplerAnnotCircle *poppler_annot,
                                                                                
PopplerColor       *poppler_color);
+POPPLER_PUBLIC
 PopplerColor                 *poppler_annot_circle_get_interior_color          
(PopplerAnnotCircle *poppler_annot);
 
 /* PopplerAnnotGeometry */
+POPPLER_PUBLIC
 GType                         poppler_annot_square_get_type                    
(void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnot                 *poppler_annot_square_new                         
(PopplerDocument    *doc,
                                                                                
 PopplerRectangle   *rect);
+POPPLER_PUBLIC
 void                          poppler_annot_square_set_interior_color          
(PopplerAnnotSquare *poppler_annot,
                                                                                
PopplerColor       *poppler_color);
+POPPLER_PUBLIC
 PopplerColor                 *poppler_annot_square_get_interior_color          
(PopplerAnnotSquare *poppler_annot);
 
 G_END_DECLS
diff --git a/glib/poppler-attachment.h b/glib/poppler-attachment.h
index ff8c849b..5a8a7e08 100644
--- a/glib/poppler-attachment.h
+++ b/glib/poppler-attachment.h
@@ -72,10 +72,13 @@ typedef struct _PopplerAttachmentClass
 } PopplerAttachmentClass;
 
 
+POPPLER_PUBLIC
 GType     poppler_attachment_get_type         (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 gboolean  poppler_attachment_save             (PopplerAttachment          
*attachment,
                                               const char                 
*filename,
                                               GError                    
**error);
+POPPLER_PUBLIC
 gboolean  poppler_attachment_save_to_callback (PopplerAttachment          
*attachment,
                                               PopplerAttachmentSaveFunc   
save_func,
                                               gpointer                    
user_data,
diff --git a/glib/poppler-date.h b/glib/poppler-date.h
index 2bb52b27..49c3f1f6 100644
--- a/glib/poppler-date.h
+++ b/glib/poppler-date.h
@@ -23,8 +23,11 @@
 #include "poppler.h"
 
 G_BEGIN_DECLS
+
+POPPLER_PUBLIC
 gboolean poppler_date_parse (const gchar *date,
                             time_t      *timet);
+
 G_END_DECLS
 
 #endif /* __POPPLER_DATE_H__ */
diff --git a/glib/poppler-document.h b/glib/poppler-document.h
index e943cd84..e1887975 100644
--- a/glib/poppler-document.h
+++ b/glib/poppler-document.h
@@ -250,151 +250,231 @@ typedef enum
   POPPLER_PDF_SUBTYPE_CONF_NONE
 } PopplerPDFConformance;
 
+POPPLER_PUBLIC
 GType              poppler_document_get_type               (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerDocument   *poppler_document_new_from_file          (const char      
*uri,
                                                            const char      
*password,
                                                            GError         
**error);
+POPPLER_PUBLIC
 PopplerDocument   *poppler_document_new_from_data          (char            
*data,
                                                            int              
length,
                                                            const char      
*password,
                                                            GError         
**error);
+POPPLER_PUBLIC
 PopplerDocument   *poppler_document_new_from_stream        (GInputStream    
*stream,
                                                             goffset          
length,
                                                             const char      
*password,
                                                             GCancellable    
*cancellable,
                                                             GError         
**error);
+POPPLER_PUBLIC
 PopplerDocument   *poppler_document_new_from_gfile         (GFile           
*file,
                                                             const char      
*password,
                                                             GCancellable    
*cancellable,
                                                             GError         
**error);
+POPPLER_PUBLIC
 gboolean           poppler_document_save                   (PopplerDocument 
*document,
                                                            const char      
*uri,
                                                            GError         
**error);
+POPPLER_PUBLIC
 gboolean           poppler_document_save_a_copy            (PopplerDocument 
*document,
                                                            const char      
*uri,
                                                            GError         
**error);
+POPPLER_PUBLIC
 gboolean           poppler_document_get_id                 (PopplerDocument 
*document,
                                                            gchar          
**permanent_id,
                                                            gchar          
**update_id);
+POPPLER_PUBLIC
 int                poppler_document_get_n_pages            (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPage       *poppler_document_get_page               (PopplerDocument 
*document,
                                                            int              
index);
+POPPLER_PUBLIC
 PopplerPage       *poppler_document_get_page_by_label      (PopplerDocument 
*document,
                                                            const char      
*label);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_pdf_version_string (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_get_pdf_version        (PopplerDocument 
*document,
                                                            guint           
*major_version,
                                                            guint           
*minor_version);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_title              (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_title              (PopplerDocument 
*document,
                                                            const gchar     
*title);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_author             (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_author             (PopplerDocument 
*document,
                                                            const gchar     
*author);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_subject            (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_subject            (PopplerDocument 
*document,
                                                            const gchar     
*subject);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_keywords           (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_keywords           (PopplerDocument 
*document,
                                                             const gchar     
*keywords);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_creator            (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_creator            (PopplerDocument 
*document,
                                                             const gchar     
*creator);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_producer           (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_producer           (PopplerDocument 
*document,
                                                             const gchar     
*producer);
+POPPLER_PUBLIC
 time_t             poppler_document_get_creation_date      (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_creation_date      (PopplerDocument 
*document,
                                                             time_t           
creation_date);
+POPPLER_PUBLIC
 time_t             poppler_document_get_modification_date  (PopplerDocument 
*document);
+POPPLER_PUBLIC
 void               poppler_document_set_modification_date  (PopplerDocument 
*document,
                                                             time_t           
modification_date);
+POPPLER_PUBLIC
 gboolean           poppler_document_is_linearized          (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPageLayout  poppler_document_get_page_layout        (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPageMode    poppler_document_get_page_mode          (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPermissions poppler_document_get_permissions        (PopplerDocument 
*document);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_pdf_subtype_string (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPDFSubtype  poppler_document_get_pdf_subtype        (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPDFPart     poppler_document_get_pdf_part           (PopplerDocument 
*document);
+POPPLER_PUBLIC
 PopplerPDFConformance poppler_document_get_pdf_conformance (PopplerDocument 
*document);
+POPPLER_PUBLIC
 gchar             *poppler_document_get_metadata           (PopplerDocument 
*document);
 
 /* Attachments */
+POPPLER_PUBLIC
 guint              poppler_document_get_n_attachments      (PopplerDocument  
*document);
+POPPLER_PUBLIC
 gboolean           poppler_document_has_attachments        (PopplerDocument  
*document);
+POPPLER_PUBLIC
 GList             *poppler_document_get_attachments        (PopplerDocument  
*document);
 
 /* Links */
+POPPLER_PUBLIC
 PopplerDest       *poppler_document_find_dest              (PopplerDocument  
*document,
                                                            const gchar      
*link_name);
 
 /* Form */
+POPPLER_PUBLIC
 PopplerFormField  *poppler_document_get_form_field         (PopplerDocument  
*document,
                                                            gint              
id);
 
 /* Interface for getting the Index of a poppler_document */
 #define POPPLER_TYPE_INDEX_ITER                 (poppler_index_iter_get_type 
())
+POPPLER_PUBLIC
 GType             poppler_index_iter_get_type   (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerIndexIter *poppler_index_iter_new        (PopplerDocument   *document);
+POPPLER_PUBLIC
 PopplerIndexIter *poppler_index_iter_copy       (PopplerIndexIter  *iter);
+POPPLER_PUBLIC
 void              poppler_index_iter_free       (PopplerIndexIter  *iter);
 
+POPPLER_PUBLIC
 PopplerIndexIter *poppler_index_iter_get_child  (PopplerIndexIter  *parent);
+POPPLER_PUBLIC
 gboolean         poppler_index_iter_is_open    (PopplerIndexIter  *iter);
+POPPLER_PUBLIC
 PopplerAction    *poppler_index_iter_get_action (PopplerIndexIter  *iter);
+POPPLER_PUBLIC
 gboolean          poppler_index_iter_next       (PopplerIndexIter  *iter);
 
 /* Interface for getting the Fonts of a poppler_document */
 #define POPPLER_TYPE_FONT_INFO             (poppler_font_info_get_type ())
 #define POPPLER_FONT_INFO(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
POPPLER_TYPE_FONT_INFO, PopplerFontInfo))
 #define POPPLER_IS_FONT_INFO(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
POPPLER_TYPE_FONT_INFO))
+POPPLER_PUBLIC
 GType             poppler_font_info_get_type       (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerFontInfo  *poppler_font_info_new            (PopplerDocument   
*document);
+POPPLER_PUBLIC
 gboolean          poppler_font_info_scan           (PopplerFontInfo   
*font_info,
                                                    int                n_pages,
                                                    PopplerFontsIter **iter);
+POPPLER_PUBLIC
 void             poppler_font_info_free            (PopplerFontInfo   
*font_info);
 
 #define POPPLER_TYPE_FONTS_ITER                    
(poppler_fonts_iter_get_type ())
+POPPLER_PUBLIC
 GType             poppler_fonts_iter_get_type      (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerFontsIter *poppler_fonts_iter_copy          (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 void              poppler_fonts_iter_free          (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 const char       *poppler_fonts_iter_get_name      (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 const char       *poppler_fonts_iter_get_full_name (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 const char       *poppler_fonts_iter_get_substitute_name (PopplerFontsIter 
*iter);
+POPPLER_PUBLIC
 const char       *poppler_fonts_iter_get_file_name (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 PopplerFontType   poppler_fonts_iter_get_font_type (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 const char       *poppler_fonts_iter_get_encoding  (PopplerFontsIter *iter);
+POPPLER_PUBLIC
 gboolean         poppler_fonts_iter_is_embedded   (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 gboolean         poppler_fonts_iter_is_subset     (PopplerFontsIter  *iter);
+POPPLER_PUBLIC
 gboolean          poppler_fonts_iter_next          (PopplerFontsIter  *iter);
 
 /* Interface for getting the Layers of a poppler_document */
 #define POPPLER_TYPE_LAYERS_ITER                   
(poppler_layers_iter_get_type ())
+POPPLER_PUBLIC
 GType              poppler_layers_iter_get_type    (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerLayersIter *poppler_layers_iter_new         (PopplerDocument   
*document);
+POPPLER_PUBLIC
 PopplerLayersIter *poppler_layers_iter_copy        (PopplerLayersIter *iter);
+POPPLER_PUBLIC
 void               poppler_layers_iter_free        (PopplerLayersIter *iter);
 
+POPPLER_PUBLIC
 PopplerLayersIter *poppler_layers_iter_get_child   (PopplerLayersIter *parent);
+POPPLER_PUBLIC
 gchar             *poppler_layers_iter_get_title   (PopplerLayersIter *iter);
+POPPLER_PUBLIC
 PopplerLayer      *poppler_layers_iter_get_layer   (PopplerLayersIter *iter);
+POPPLER_PUBLIC
 gboolean           poppler_layers_iter_next        (PopplerLayersIter *iter);
 
 /* Export to ps */
 #define POPPLER_TYPE_PS_FILE             (poppler_ps_file_get_type ())
 #define POPPLER_PS_FILE(obj)             (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
POPPLER_TYPE_PS_FILE, PopplerPSFile))
 #define POPPLER_IS_PS_FILE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
POPPLER_TYPE_PS_FILE))
+POPPLER_PUBLIC
 GType          poppler_ps_file_get_type       (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerPSFile *poppler_ps_file_new            (PopplerDocument *document,
                                                const char      *filename,
                                                int              first_page,
                                                int              n_pages);
+POPPLER_PUBLIC
 void           poppler_ps_file_set_paper_size (PopplerPSFile   *ps_file,
                                                double           width,
                                                double           height);
+POPPLER_PUBLIC
 void           poppler_ps_file_set_duplex     (PopplerPSFile   *ps_file,
                                                gboolean         duplex);
+POPPLER_PUBLIC
 void           poppler_ps_file_free           (PopplerPSFile   *ps_file);
 
 
diff --git a/glib/poppler-enums.h.template b/glib/poppler-enums.h.template
index 5d056dd5..84c5b7d0 100644
--- a/glib/poppler-enums.h.template
+++ b/glib/poppler-enums.h.template
@@ -5,6 +5,8 @@
 
 #include <glib-object.h>
 
+#include "poppler.h"
+
 G_BEGIN_DECLS
 /*** END file-header ***/
 
@@ -14,6 +16,7 @@ G_BEGIN_DECLS
 /*** END file-production ***/
 
 /*** BEGIN value-header ***/
+POPPLER_PUBLIC
 GType @enum_name@_get_type (void) G_GNUC_CONST;
 #define POPPLER_TYPE_@ENUMSHORT@ (@enum_name@_get_type ())
 /*** END value-header ***/
diff --git a/glib/poppler-form-field.h b/glib/poppler-form-field.h
index 898e0f6c..94774860 100644
--- a/glib/poppler-form-field.h
+++ b/glib/poppler-form-field.h
@@ -58,52 +58,85 @@ typedef enum
   POPPLER_FORM_CHOICE_LIST
 } PopplerFormChoiceType;
 
+POPPLER_PUBLIC
 GType                 poppler_form_field_get_type                (void) 
G_GNUC_CONST;
 
+POPPLER_PUBLIC
 PopplerFormFieldType  poppler_form_field_get_field_type          
(PopplerFormField *field);
+POPPLER_PUBLIC
 gint                  poppler_form_field_get_id                  
(PopplerFormField *field);
+POPPLER_PUBLIC
 gdouble               poppler_form_field_get_font_size           
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_is_read_only            
(PopplerFormField *field);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_get_partial_name        
(PopplerFormField *field);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_get_mapping_name        
(PopplerFormField *field);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_get_name                
(PopplerFormField *field);
+POPPLER_PUBLIC
 PopplerAction        *poppler_form_field_get_action              
(PopplerFormField *field);
 
 /* Button Field */
+POPPLER_PUBLIC
 PopplerFormButtonType poppler_form_field_button_get_button_type  
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_button_get_state        
(PopplerFormField *field);
+POPPLER_PUBLIC
 void                  poppler_form_field_button_set_state        
(PopplerFormField *field,
                                                                  gboolean      
    state);
 
 /* Text Field */
+POPPLER_PUBLIC
 PopplerFormTextType   poppler_form_field_text_get_text_type      
(PopplerFormField *field);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_text_get_text           
(PopplerFormField *field);
+POPPLER_PUBLIC
 void                  poppler_form_field_text_set_text           
(PopplerFormField *field,
                                                                  const gchar   
   *text);
+POPPLER_PUBLIC
 gint                  poppler_form_field_text_get_max_len        
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_text_do_spell_check     
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_text_do_scroll          
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_text_is_rich_text       
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_text_is_password        
(PopplerFormField *field);
 
 /* Choice Field */
+POPPLER_PUBLIC
 PopplerFormChoiceType poppler_form_field_choice_get_choice_type  
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_choice_is_editable      
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean           poppler_form_field_choice_can_select_multiple 
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_choice_do_spell_check   
(PopplerFormField *field);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_choice_commit_on_change 
(PopplerFormField *field);
+POPPLER_PUBLIC
 gint                  poppler_form_field_choice_get_n_items      
(PopplerFormField *field);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_choice_get_item         
(PopplerFormField *field,
                                                                  gint          
    index);
+POPPLER_PUBLIC
 gboolean              poppler_form_field_choice_is_item_selected 
(PopplerFormField *field,
                                                                  gint          
    index);
+POPPLER_PUBLIC
 void                  poppler_form_field_choice_select_item      
(PopplerFormField *field,
                                                                  gint          
    index);
+POPPLER_PUBLIC
 void                  poppler_form_field_choice_unselect_all     
(PopplerFormField *field);
+POPPLER_PUBLIC
 void                  poppler_form_field_choice_toggle_item      
(PopplerFormField *field,
                                                                  gint          
    index);
+POPPLER_PUBLIC
 void                  poppler_form_field_choice_set_text         
(PopplerFormField *field,
                                                                  const gchar   
   *text);
+POPPLER_PUBLIC
 gchar                *poppler_form_field_choice_get_text         
(PopplerFormField *field);
 
 G_END_DECLS
diff --git a/glib/poppler-layer.h b/glib/poppler-layer.h
index 2434e275..69637232 100644
--- a/glib/poppler-layer.h
+++ b/glib/poppler-layer.h
@@ -29,13 +29,20 @@ G_BEGIN_DECLS
 #define POPPLER_LAYER(obj)    (G_TYPE_CHECK_INSTANCE_CAST ((obj), 
POPPLER_TYPE_LAYER, PopplerLayer))
 #define POPPLER_IS_LAYER(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
POPPLER_TYPE_LAYER))
 
+POPPLER_PUBLIC
 GType        poppler_layer_get_type                  (void) G_GNUC_CONST;
 
+POPPLER_PUBLIC
 const gchar *poppler_layer_get_title                 (PopplerLayer *layer);
+POPPLER_PUBLIC
 gboolean     poppler_layer_is_visible                (PopplerLayer *layer);
+POPPLER_PUBLIC
 void         poppler_layer_show                      (PopplerLayer *layer);
+POPPLER_PUBLIC
 void         poppler_layer_hide                      (PopplerLayer *layer);
+POPPLER_PUBLIC
 gboolean     poppler_layer_is_parent                 (PopplerLayer *layer);
+POPPLER_PUBLIC
 gint         poppler_layer_get_radio_button_group_id (PopplerLayer *layer);
 
 G_END_DECLS
diff --git a/glib/poppler-macros.h b/glib/poppler-macros.h
new file mode 100644
index 00000000..58ced396
--- /dev/null
+++ b/glib/poppler-macros.h
@@ -0,0 +1,33 @@
+/*
+ * Copyright © 2018 Christian Persch
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2, or (at your option)
+ * any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street - Fifth Floor, Boston, MA 02110-1301, 
USA.
+ */
+
+#ifndef __POPPLER_MACROS_H__
+#define __POPPLER_MACROS_H__
+
+/**
+ * POPPLER_PUBLIC:
+ */
+#if defined(_WIN32)
+#  define POPPLER_PUBLIC __declspec(dllexport)
+#elif defined(__GNUC__)
+#  define POPPLER_PUBLIC __attribute__((visibility("default"))) extern
+#else
+#  define POPPLER_PUBLIC
+#endif
+
+#endif /* __POPPLER_MACROS_H__ */
diff --git a/glib/poppler-media.h b/glib/poppler-media.h
index 292d3866..6af8d59c 100644
--- a/glib/poppler-media.h
+++ b/glib/poppler-media.h
@@ -55,13 +55,19 @@ typedef gboolean (*PopplerMediaSaveFunc) (const gchar  *buf,
                                          gpointer      data,
                                          GError      **error);
 
+POPPLER_PUBLIC
 GType        poppler_media_get_type         (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 gboolean     poppler_media_is_embedded      (PopplerMedia        
*poppler_media);
+POPPLER_PUBLIC
 const gchar *poppler_media_get_filename     (PopplerMedia        
*poppler_media);
+POPPLER_PUBLIC
 const gchar *poppler_media_get_mime_type    (PopplerMedia        
*poppler_media);
+POPPLER_PUBLIC
 gboolean     poppler_media_save             (PopplerMedia        
*poppler_media,
                                             const char          *filename,
                                             GError             **error);
+POPPLER_PUBLIC
 gboolean     poppler_media_save_to_callback (PopplerMedia        
*poppler_media,
                                             PopplerMediaSaveFunc save_func,
                                             gpointer             user_data,
diff --git a/glib/poppler-movie.h b/glib/poppler-movie.h
index d76522a3..02c07650 100644
--- a/glib/poppler-movie.h
+++ b/glib/poppler-movie.h
@@ -51,10 +51,15 @@ typedef enum
   POPPLER_MOVIE_PLAY_MODE_PALINDROME
 } PopplerMoviePlayMode;
 
+POPPLER_PUBLIC
 GType                poppler_movie_get_type      (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 const gchar         *poppler_movie_get_filename  (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
 gboolean             poppler_movie_need_poster   (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
 gboolean             poppler_movie_show_controls (PopplerMovie *poppler_movie);
+POPPLER_PUBLIC
 PopplerMoviePlayMode poppler_movie_get_play_mode (PopplerMovie *poppler_movie);
 
 G_END_DECLS
diff --git a/glib/poppler-page.h b/glib/poppler-page.h
index fdbfd38e..487b3656 100644
--- a/glib/poppler-page.h
+++ b/glib/poppler-page.h
@@ -32,16 +32,22 @@ G_BEGIN_DECLS
 #define POPPLER_IS_PAGE(obj)          (G_TYPE_CHECK_INSTANCE_TYPE ((obj), 
POPPLER_TYPE_PAGE))
 
 
+POPPLER_PUBLIC
 GType                 poppler_page_get_type             (void) G_GNUC_CONST;
 
+POPPLER_PUBLIC
 void                   poppler_page_render               (PopplerPage        
*page,
                                                          cairo_t            
*cairo);
+POPPLER_PUBLIC
 void                   poppler_page_render_for_printing  (PopplerPage        
*page,
                                                          cairo_t            
*cairo);
+POPPLER_PUBLIC
 void       poppler_page_render_for_printing_with_options (PopplerPage        
*page,
                                                           cairo_t            
*cairo,
                                                           PopplerPrintFlags   
options);
+POPPLER_PUBLIC
 cairo_surface_t       *poppler_page_get_thumbnail        (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                   poppler_page_render_selection     (PopplerPage        
*page,
                                                          cairo_t            
*cairo,
                                                          PopplerRectangle   
*selection,
@@ -50,63 +56,95 @@ void                   poppler_page_render_selection     
(PopplerPage        *pa
                                                          PopplerColor       
*glyph_color,
                                                          PopplerColor       
*background_color);
 
+POPPLER_PUBLIC
 void                   poppler_page_get_size             (PopplerPage        
*page,
                                                          double             
*width,
                                                          double             
*height);
+POPPLER_PUBLIC
 int                    poppler_page_get_index            (PopplerPage        
*page);
+POPPLER_PUBLIC
 gchar                 *poppler_page_get_label            (PopplerPage        
*page);
+POPPLER_PUBLIC
 double                 poppler_page_get_duration         (PopplerPage        
*page);
+POPPLER_PUBLIC
 PopplerPageTransition *poppler_page_get_transition       (PopplerPage        
*page);
+POPPLER_PUBLIC
 gboolean               poppler_page_get_thumbnail_size   (PopplerPage        
*page,
                                                          int                
*width,
                                                          int                
*height);
+POPPLER_PUBLIC
 GList             *poppler_page_find_text_with_options   (PopplerPage        
*page,
                                                          const  char        
*text,
                                                          PopplerFindFlags    
options);
+POPPLER_PUBLIC
 GList                *poppler_page_find_text            (PopplerPage        
*page,
                                                          const  char        
*text);
+POPPLER_PUBLIC
 void                   poppler_page_render_to_ps         (PopplerPage        
*page,
                                                          PopplerPSFile      
*ps_file);
+POPPLER_PUBLIC
 char                  *poppler_page_get_text             (PopplerPage        
*page);
+POPPLER_PUBLIC
 char                  *poppler_page_get_text_for_area    (PopplerPage        
*page,
                                                           PopplerRectangle   
*area);
+POPPLER_PUBLIC
 char                  *poppler_page_get_selected_text    (PopplerPage        
*page,
                                                          PopplerSelectionStyle 
style,
                                                          PopplerRectangle   
*selection);
+POPPLER_PUBLIC
 cairo_region_t        *poppler_page_get_selected_region  (PopplerPage        
*page,
                                                           gdouble             
scale,
                                                           
PopplerSelectionStyle  style,
                                                           PopplerRectangle   
*selection);
+POPPLER_PUBLIC
 GList                 *poppler_page_get_selection_region (PopplerPage        
*page,
                                                          gdouble             
scale,
                                                          PopplerSelectionStyle 
style,
                                                          PopplerRectangle   
*selection);
+POPPLER_PUBLIC
 void                   poppler_page_selection_region_free(GList              
*region);
+POPPLER_PUBLIC
 GList                 *poppler_page_get_link_mapping     (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                   poppler_page_free_link_mapping    (GList              
*list);
+POPPLER_PUBLIC
 GList                 *poppler_page_get_image_mapping    (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                   poppler_page_free_image_mapping   (GList              
*list);
+POPPLER_PUBLIC
 cairo_surface_t       *poppler_page_get_image            (PopplerPage        
*page,
                                                          gint                
image_id);
+POPPLER_PUBLIC
 GList              *poppler_page_get_form_field_mapping  (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                poppler_page_free_form_field_mapping (GList              
*list);
+POPPLER_PUBLIC
 GList                 *poppler_page_get_annot_mapping    (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                   poppler_page_free_annot_mapping   (GList              
*list);
+POPPLER_PUBLIC
 void                   poppler_page_add_annot            (PopplerPage        
*page,
                                                          PopplerAnnot       
*annot);
+POPPLER_PUBLIC
 void                   poppler_page_remove_annot         (PopplerPage        
*page,
                                                           PopplerAnnot       
*annot);
+POPPLER_PUBLIC
 void                 poppler_page_get_crop_box          (PopplerPage        
*page,
                                                          PopplerRectangle   
*rect);
+POPPLER_PUBLIC
 gboolean               poppler_page_get_text_layout      (PopplerPage        
*page,
                                                           PopplerRectangle  
**rectangles,
                                                           guint              
*n_rectangles);
+POPPLER_PUBLIC
 gboolean           poppler_page_get_text_layout_for_area (PopplerPage        
*page,
                                                           PopplerRectangle   
*area,
                                                           PopplerRectangle  
**rectangles,
                                                           guint              
*n_rectangles);
+POPPLER_PUBLIC
 GList                 *poppler_page_get_text_attributes  (PopplerPage        
*page);
+POPPLER_PUBLIC
 void                   poppler_page_free_text_attributes (GList              
*list);
+POPPLER_PUBLIC
 GList *        poppler_page_get_text_attributes_for_area (PopplerPage        
*page,
                                                           PopplerRectangle   
*area);
 
@@ -130,9 +168,13 @@ struct _PopplerRectangle
   gdouble y2;
 };
 
+POPPLER_PUBLIC
 GType             poppler_rectangle_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerRectangle *poppler_rectangle_new      (void);
+POPPLER_PUBLIC
 PopplerRectangle *poppler_rectangle_copy     (PopplerRectangle *rectangle);
+POPPLER_PUBLIC
 void              poppler_rectangle_free     (PopplerRectangle *rectangle);
 
 /* A point on a page, with coordinates in PDF points. */
@@ -150,9 +192,13 @@ struct _PopplerPoint
   gdouble y;
 };
 
+POPPLER_PUBLIC
 GType             poppler_point_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerPoint     *poppler_point_new      (void);
+POPPLER_PUBLIC
 PopplerPoint     *poppler_point_copy     (PopplerPoint *point);
+POPPLER_PUBLIC
 void              poppler_point_free     (PopplerPoint *point);
 
 /* PopplerQuadrilateral */
@@ -183,9 +229,13 @@ struct _PopplerQuadrilateral
   PopplerPoint p4;
 };
 
+POPPLER_PUBLIC
 GType                 poppler_quadrilateral_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerQuadrilateral *poppler_quadrilateral_new      (void);
+POPPLER_PUBLIC
 PopplerQuadrilateral *poppler_quadrilateral_copy     (PopplerQuadrilateral 
*quad);
+POPPLER_PUBLIC
 void                 poppler_quadrilateral_free     (PopplerQuadrilateral 
*quad);
 
 /* A color in RGB */
@@ -207,9 +257,13 @@ struct _PopplerColor
   guint16 blue;
 };
 
+POPPLER_PUBLIC
 GType             poppler_color_get_type      (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerColor     *poppler_color_new           (void);
+POPPLER_PUBLIC
 PopplerColor     *poppler_color_copy          (PopplerColor *color);
+POPPLER_PUBLIC
 void              poppler_color_free          (PopplerColor *color);
 
 /* Text attributes. */
@@ -238,9 +292,13 @@ struct _PopplerTextAttributes
   gint end_index;
 };
 
+POPPLER_PUBLIC
 GType                  poppler_text_attributes_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerTextAttributes *poppler_text_attributes_new      (void);
+POPPLER_PUBLIC
 PopplerTextAttributes *poppler_text_attributes_copy     (PopplerTextAttributes 
*text_attrs);
+POPPLER_PUBLIC
 void                   poppler_text_attributes_free     (PopplerTextAttributes 
*text_attrs);
 
 /* Mapping between areas on the current page and PopplerActions */
@@ -260,9 +318,13 @@ struct  _PopplerLinkMapping
   PopplerAction *action;
 };
 
+POPPLER_PUBLIC
 GType               poppler_link_mapping_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerLinkMapping *poppler_link_mapping_new      (void);
+POPPLER_PUBLIC
 PopplerLinkMapping *poppler_link_mapping_copy     (PopplerLinkMapping 
*mapping);
+POPPLER_PUBLIC
 void                poppler_link_mapping_free     (PopplerLinkMapping 
*mapping);
 
 /* Page Transition */
@@ -302,9 +364,13 @@ struct _PopplerPageTransition
   gdouble duration_real;
 };
 
+POPPLER_PUBLIC
 GType                  poppler_page_transition_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerPageTransition *poppler_page_transition_new      (void);
+POPPLER_PUBLIC
 PopplerPageTransition *poppler_page_transition_copy     (PopplerPageTransition 
*transition);
+POPPLER_PUBLIC
 void                   poppler_page_transition_free     (PopplerPageTransition 
*transition);
 
 /* Mapping between areas on the current page and images */
@@ -324,9 +390,13 @@ struct  _PopplerImageMapping
   gint image_id;       
 };
 
+POPPLER_PUBLIC
 GType                  poppler_image_mapping_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerImageMapping   *poppler_image_mapping_new      (void);
+POPPLER_PUBLIC
 PopplerImageMapping   *poppler_image_mapping_copy     (PopplerImageMapping 
*mapping);
+POPPLER_PUBLIC
 void                   poppler_image_mapping_free     (PopplerImageMapping 
*mapping);
 
 /* Mapping between areas on the current page and form fields */
@@ -346,9 +416,13 @@ struct  _PopplerFormFieldMapping
   PopplerFormField *field;
 };
 
+POPPLER_PUBLIC
 GType                    poppler_form_field_mapping_get_type (void) 
G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerFormFieldMapping *poppler_form_field_mapping_new      (void);
+POPPLER_PUBLIC
 PopplerFormFieldMapping *poppler_form_field_mapping_copy     
(PopplerFormFieldMapping *mapping);
+POPPLER_PUBLIC
 void                     poppler_form_field_mapping_free     
(PopplerFormFieldMapping *mapping);
 
 /* Mapping between areas on the current page and annots */
@@ -368,9 +442,13 @@ struct _PopplerAnnotMapping
   PopplerAnnot *annot;
 };
 
+POPPLER_PUBLIC
 GType                poppler_annot_mapping_get_type (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerAnnotMapping *poppler_annot_mapping_new      (void);
+POPPLER_PUBLIC
 PopplerAnnotMapping *poppler_annot_mapping_copy     (PopplerAnnotMapping 
*mapping);
+POPPLER_PUBLIC
 void                 poppler_annot_mapping_free     (PopplerAnnotMapping 
*mapping);
 
 G_END_DECLS
diff --git a/glib/poppler-structure-element.h b/glib/poppler-structure-element.h
index 3848c210..271f28a0 100644
--- a/glib/poppler-structure-element.h
+++ b/glib/poppler-structure-element.h
@@ -250,106 +250,178 @@ typedef enum {
 } PopplerStructureTableScope;
 
 
+POPPLER_PUBLIC
 GType                            poppler_structure_element_get_type            
   (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerStructureElementKind      poppler_structure_element_get_kind            
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gint                             poppler_structure_element_get_page            
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_is_content          
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_is_inline           
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_is_block            
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_is_grouping         
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_id              
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_title           
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_abbreviation    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_language        
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_text            
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerStructureGetTextFlags flags);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_alt_text        
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_actual_text     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerTextSpan                **poppler_structure_element_get_text_spans      
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    guint                       *n_text_spans);
 
+POPPLER_PUBLIC
 PopplerStructurePlacement        poppler_structure_element_get_placement       
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureWritingMode      poppler_structure_element_get_writing_mode    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         
poppler_structure_element_get_background_color   (PopplerStructureElement     
*poppler_structure_element,
                                                                                
    PopplerColor                *color);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_get_border_color    
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerColor                *colors);
+POPPLER_PUBLIC
 void                             poppler_structure_element_get_border_style    
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerStructureBorderStyle *border_styles);
+POPPLER_PUBLIC
 gboolean                         
poppler_structure_element_get_border_thickness   (PopplerStructureElement     
*poppler_structure_element,
                                                                                
    gdouble                     *border_thicknesses);
+POPPLER_PUBLIC
 void                             poppler_structure_element_get_padding         
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    gdouble                     *paddings);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_get_color           
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerColor                *color);
 
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_space_before    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_space_after     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_start_indent    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_end_indent      
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_text_indent     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureTextAlign        poppler_structure_element_get_text_align      
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         poppler_structure_element_get_bounding_box    
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerRectangle            *bounding_box);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_width           
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_height          
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureBlockAlign       poppler_structure_element_get_block_align     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureInlineAlign      poppler_structure_element_get_inline_align    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 void                             
poppler_structure_element_get_table_border_style (PopplerStructureElement     
*poppler_structure_element,
                                                                                
    PopplerStructureBorderStyle *border_styles);
+POPPLER_PUBLIC
 void                             poppler_structure_element_get_table_padding   
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    gdouble                     *paddings);
 
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_baseline_shift  
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                          poppler_structure_element_get_line_height     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gboolean                         
poppler_structure_element_get_text_decoration_color
                                                                                
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    PopplerColor                *color);
+POPPLER_PUBLIC
 gdouble                          
poppler_structure_element_get_text_decoration_thickness
                                                                                
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureTextDecoration   
poppler_structure_element_get_text_decoration_type
                                                                                
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureRubyAlign        poppler_structure_element_get_ruby_align      
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureRubyPosition     poppler_structure_element_get_ruby_position   
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureGlyphOrientation 
poppler_structure_element_get_glyph_orientation  (PopplerStructureElement     
*poppler_structure_element);
 
+POPPLER_PUBLIC
 guint                            poppler_structure_element_get_column_count    
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gdouble                         *poppler_structure_element_get_column_gaps     
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    guint                       *n_values);
+POPPLER_PUBLIC
 gdouble                         *poppler_structure_element_get_column_widths   
   (PopplerStructureElement     *poppler_structure_element,
                                                                                
    guint                       *n_values);
 
+POPPLER_PUBLIC
 PopplerStructureListNumbering    poppler_structure_element_get_list_numbering  
   (PopplerStructureElement     *poppler_structure_element);
 
+POPPLER_PUBLIC
 PopplerStructureFormRole         poppler_structure_element_get_form_role       
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureFormState        poppler_structure_element_get_form_state      
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           
*poppler_structure_element_get_form_description   (PopplerStructureElement     
*poppler_structure_element);
 
+POPPLER_PUBLIC
 guint                            poppler_structure_element_get_table_row_span  
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 guint                            
poppler_structure_element_get_table_column_span  (PopplerStructureElement     
*poppler_structure_element);
+POPPLER_PUBLIC
 gchar                          **poppler_structure_element_get_table_headers   
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 PopplerStructureTableScope       poppler_structure_element_get_table_scope     
   (PopplerStructureElement     *poppler_structure_element);
+POPPLER_PUBLIC
 gchar                           *poppler_structure_element_get_table_summary   
   (PopplerStructureElement     *poppler_structure_element);
 
 #define POPPLER_TYPE_STRUCTURE_ELEMENT_ITER                                    
   (poppler_structure_element_iter_get_type ())
+POPPLER_PUBLIC
 GType                        poppler_structure_element_iter_get_type           
   (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerStructureElementIter *poppler_structure_element_iter_new                
   (PopplerDocument             *poppler_document);
+POPPLER_PUBLIC
 PopplerStructureElementIter *poppler_structure_element_iter_get_child          
   (PopplerStructureElementIter *parent);
+POPPLER_PUBLIC
 PopplerStructureElementIter *poppler_structure_element_iter_copy               
   (PopplerStructureElementIter *iter);
+POPPLER_PUBLIC
 PopplerStructureElement     *poppler_structure_element_iter_get_element        
   (PopplerStructureElementIter *iter);
+POPPLER_PUBLIC
 gboolean                     poppler_structure_element_iter_next               
   (PopplerStructureElementIter *iter);
+POPPLER_PUBLIC
 void                         poppler_structure_element_iter_free               
   (PopplerStructureElementIter *iter);
 
 #define POPPLER_TYPE_TEXT_SPAN                                                 
   (poppler_text_span_get_type ())
+POPPLER_PUBLIC
 GType                        poppler_text_span_get_type                        
   (void) G_GNUC_CONST;
+POPPLER_PUBLIC
 PopplerTextSpan             *poppler_text_span_copy                            
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 void                         poppler_text_span_free                            
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 gboolean                     poppler_text_span_is_fixed_width_font             
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 gboolean                     poppler_text_span_is_serif_font                   
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 gboolean                     poppler_text_span_is_bold_font                    
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 void                         poppler_text_span_get_color                       
   (PopplerTextSpan *poppler_text_span,
                                                                                
    PopplerColor    *color);
+POPPLER_PUBLIC
 const gchar                 *poppler_text_span_get_text                        
   (PopplerTextSpan *poppler_text_span);
+POPPLER_PUBLIC
 const gchar                 *poppler_text_span_get_font_name                   
   (PopplerTextSpan *poppler_text_span);
 
 G_END_DECLS
diff --git a/glib/poppler.h b/glib/poppler.h
index 1e78050e..c0a6cd34 100644
--- a/glib/poppler.h
+++ b/glib/poppler.h
@@ -21,8 +21,11 @@
 
 #include <glib-object.h>
 
+#include "poppler-macros.h"
+
 G_BEGIN_DECLS
 
+POPPLER_PUBLIC
 GQuark poppler_error_quark (void);
 
 #define POPPLER_ERROR poppler_error_quark ()
@@ -220,7 +223,9 @@ typedef enum
   POPPLER_BACKEND_CAIRO
 } PopplerBackend;
 
+POPPLER_PUBLIC
 PopplerBackend poppler_get_backend (void);
+POPPLER_PUBLIC
 const char *   poppler_get_version (void);
 
 G_END_DECLS
commit 1d8df8e36b5627a4dffbfe76e384022daf6e4eb1
Author: Christian Persch <[email protected]>
Date:   Fri Oct 19 23:48:49 2018 +0200

    pdf-inspector: Link to the right libraries
    
    pdf-inspector doesn't use libpoppler-glib, but linked to it.
    Changing it to link only to libpoppler revealed that it
    used lots of symbols from poppler-glib that poppler-glib
    should not export. Fix that by adding the necessary sources
    to the pdf-inspector sources and linking to the libraries
    needed by these sources (freetype, pthreads).

diff --git a/test/CMakeLists.txt b/test/CMakeLists.txt
index b6c1df29..875da791 100644
--- a/test/CMakeLists.txt
+++ b/test/CMakeLists.txt
@@ -37,9 +37,15 @@ if (GTK_FOUND)
 
     set (pdf_inspector_SRCS
       pdf-inspector.cc
+      ${CMAKE_SOURCE_DIR}/poppler/CairoFontEngine.cc
+      ${CMAKE_SOURCE_DIR}/poppler/CairoOutputDev.cc
+      ${CMAKE_SOURCE_DIR}/poppler/CairoRescaleBox.cc
     )
     poppler_add_test(pdf-inspector BUILD_GTK_TESTS ${pdf_inspector_SRCS})
-    target_link_libraries(pdf-inspector ${CAIRO_LIBRARIES} poppler-glib 
${GTK3_LIBRARIES})
+    target_link_libraries(pdf-inspector ${CAIRO_LIBRARIES} 
${FREETYPE_LIBRARIES} ${common_libs} ${GTK3_LIBRARIES} poppler)
+    if(CMAKE_USE_PTHREADS_INIT)
+       target_link_libraries(pdf-inspector Threads::Threads)
+    endif()
 
   endif ()
 
_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to