diff -ur poppler-0.12.4.orig/poppler/GlobalParams.cc poppler-0.12.4/poppler/GlobalParams.cc --- poppler-0.12.4.orig/poppler/GlobalParams.cc 2010-01-17 01:06:58.000000000 +0100 +++ poppler-0.12.4/poppler/GlobalParams.cc 2011-04-14 10:34:35.000000000 +0200 @@ -140,6 +140,7 @@ } } +#ifndef PDF_PARSER_ONLY #ifdef _WIN32 //------------------------------------------------------------------------ @@ -384,6 +385,7 @@ } #endif // _WIN32 +#endif // PDF_PARSER_ONLY //------------------------------------------------------------------------ // PSFontParam @@ -557,7 +559,7 @@ UnicodeMap *map; int i; -#ifndef _MSC_VER +#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER) FcInit(); FCcfg = FcConfigGetCurrent(); #endif @@ -641,10 +643,12 @@ unicodeMapCache = new UnicodeMapCache(); cMapCache = new CMapCache(); +#ifndef PDF_PARSER_ONLY #ifdef _WIN32 baseFontsInitialized = gFalse; winFontList = NULL; #endif +#endif #ifdef ENABLE_PLUGINS plugins = new GooList(); @@ -806,9 +810,11 @@ deleteGooHash(unicodeMaps, GooString); deleteGooList(toUnicodeDirs, GooString); deleteGooHash(displayFonts, DisplayFontParam); +#ifndef PDF_PARSER_ONLY #ifdef _WIN32 delete winFontList; #endif +#endif deleteGooHash(psFonts, PSFontParam); deleteGooList(psNamedFonts16, PSFontParam); deleteGooList(psFonts16, PSFontParam); @@ -944,6 +950,7 @@ return NULL; } +#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER) static GBool findModifier(const char *name, const char *modifier, const char **start) { const char *match; @@ -962,7 +969,6 @@ } } -#ifndef _MSC_VER static FcPattern *buildFcPattern(GfxFont *font) { int weight = -1, @@ -1110,7 +1116,11 @@ /* if you can't or don't want to use Fontconfig, you need to implement this function for your platform. For Windows, it's in GlobalParamsWin.cc */ -#ifndef _MSC_VER +#ifdef PDF_PARSER_ONLY +DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) { + return NULL; +} +#elif !defined(_MSC_VER) DisplayFontParam *GlobalParams::getDisplayFont(GfxFont *font) { DisplayFontParam *dfp; FcPattern *p=0; diff -ur poppler-0.12.4.orig/poppler/GlobalParams.h poppler-0.12.4/poppler/GlobalParams.h --- poppler-0.12.4.orig/poppler/GlobalParams.h 2010-01-17 01:06:58.000000000 +0100 +++ poppler-0.12.4/poppler/GlobalParams.h 2011-04-14 10:32:41.000000000 +0200 @@ -37,7 +37,7 @@ #include #include "poppler-config.h" #include -#ifndef _MSC_VER +#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER) #include #endif #include "goo/gtypes.h" @@ -61,9 +61,11 @@ class GlobalParams; class GfxFont; class Stream; +#ifndef PDF_PARSER_ONLY #ifdef _WIN32 class WinFontList; #endif +#endif //------------------------------------------------------------------------ @@ -169,7 +171,7 @@ void setBaseDir(char *dir); -#ifdef _MSC_VER +#if !defined(PDF_PARSER_ONLY) && !defined(_MSC_VER) void setupBaseFonts(char *dir); #endif @@ -303,10 +305,12 @@ GooList *toUnicodeDirs; // list of ToUnicode CMap dirs [GooString] GooHash *displayFonts; // display font info, indexed by font name // [DisplayFontParam] +#ifndef PDF_PARSER_ONLY #ifdef _WIN32 GBool baseFontsInitialized; WinFontList *winFontList; // system TrueType fonts #endif +#endif GBool psExpandSmaller; // expand smaller pages to fill paper GBool psShrinkLarger; // shrink larger pages to fit paper GBool psCenter; // center pages on the paper @@ -352,7 +356,7 @@ UnicodeMapCache *unicodeMapCache; CMapCache *cMapCache; -#ifndef _MSC_VER +#if !defined (PDF_PARSER_ONLY) && !defined(_MSC_VER) FcConfig *FCcfg; #endif diff -ur poppler-0.12.4.orig/poppler/Page.cc poppler-0.12.4/poppler/Page.cc --- poppler-0.12.4.orig/poppler/Page.cc 2010-01-17 01:06:57.000000000 +0100 +++ poppler-0.12.4/poppler/Page.cc 2011-04-12 16:17:47.000000000 +0200 @@ -45,13 +45,11 @@ #include "XRef.h" #include "Link.h" #include "OutputDev.h" -#ifndef PDF_PARSER_ONLY #include "Gfx.h" #include "GfxState.h" #include "Annot.h" #include "TextOutputDev.h" #include "Form.h" -#endif #include "Error.h" #include "Page.h" #include "Catalog.h"