summaryrefslogtreecommitdiff
path: root/src/bin/pdf/main.cpp
diff options
context:
space:
mode:
authorStefan Schmidt <s.schmidt@samsung.com>2015-03-06 10:44:50 +0100
committerStefan Schmidt <s.schmidt@samsung.com>2015-03-06 11:08:09 +0100
commit1e1a1e6fffc1805aadf75467e72af71391636075 (patch)
treecbea1551a38cd7017b8f81e1d5e067781806ad8f /src/bin/pdf/main.cpp
parent5cf9aa4c41da5ed0e154a5c796bdb0baa82495fd (diff)
downloadevas_generic_loaders-1e1a1e6fffc1805aadf75467e72af71391636075.tar.gz
pdf: Add support for changes with poppler >= 0.31
With 0.31 poppler removed some parts of GlobalParams which they do not consider a public API. The antialias setting can now be done over the output device. Fixes T2184 @fix
Diffstat (limited to 'src/bin/pdf/main.cpp')
-rw-r--r--src/bin/pdf/main.cpp10
1 files changed, 8 insertions, 2 deletions
diff --git a/src/bin/pdf/main.cpp b/src/bin/pdf/main.cpp
index a68b21f..78f918e 100644
--- a/src/bin/pdf/main.cpp
+++ b/src/bin/pdf/main.cpp
@@ -62,10 +62,12 @@ Eina_Bool poppler_init(const char *file, int page_nbr, int size_w, int size_h)
if (!eina_init())
goto del_global_param;
+#ifndef HAVE_POPPLER_031
if (globalParams->getAntialias())
globalParams->setAntialias((char *)"yes");
if (globalParams->getVectorAntialias())
globalParams->setVectorAntialias((char *)"yes");
+#endif
pdfdoc = new PDFDoc(new GooString(file), NULL);
if (!pdfdoc)
@@ -161,7 +163,7 @@ void poppler_load_image(int size_w, int size_h)
if (!output_dev)
return;
-#ifdef HAVE_POPPLER_020
+#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031)
output_dev->startDoc(pdfdoc);
#else
output_dev->startDoc(pdfdoc->getXRef());
@@ -169,8 +171,12 @@ void poppler_load_image(int size_w, int size_h)
if (dpi <= 0.0) dpi = DEF_DPI;
+#ifdef HAVE_POPPLER_031
+ output_dev->setFontAntialias(EINA_TRUE);
+ output_dev->setVectorAntialias(EINA_TRUE);
+#endif
-#ifdef HAVE_POPPLER_020
+#if defined(HAVE_POPPLER_020) || defined(HAVE_POPPLER_031)
page->displaySlice(output_dev, dpi, dpi,
0, false, false,
0, 0, width, height,