[poppler] poppler Digest, Vol 65, Issue 32

Cory Ferriby cferriby at gmail.com
Mon Jul 19 13:29:39 PDT 2010


thank you Albert, i did find on launchpad that there are python bindings
made, and work is being done for windows binaries as well. with some work
they did run. but only with evince dlls in the same directory as the
bindings and it won't work trying to keep it in the python library folder.
also i think the version they made it with is older. it will work for my
purposes i suppose. doesn;t have to be pretty just functional.

Cory

On Mon, Jul 19, 2010 at 3:00 PM, <poppler-request at lists.freedesktop.org>wrote:

> Send poppler mailing list submissions to
>        poppler at lists.freedesktop.org
>
> To subscribe or unsubscribe via the World Wide Web, visit
>        http://lists.freedesktop.org/mailman/listinfo/poppler
> or, via email, send a message with subject or body 'help' to
>        poppler-request at lists.freedesktop.org
>
> You can reach the person managing the list at
>        poppler-owner at lists.freedesktop.org
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of poppler digest..."
>
>
> Today's Topics:
>
>   1. windows python gtk bindings (cferriby at gmail.com)
>   2. Re: windows python gtk bindings (Albert Astals Cid)
>   3. Re: Killing exception support (Albert Astals Cid)
>   4. 2 commits - CMakeLists.txt config.h.cmake configure.ac
>      .gitignore goo/gmem.cc goo/gmem.h poppler/poppler-config.h.cmake
>      poppler/poppler-config.h.in (Albert Astals Cid)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Mon, 19 Jul 2010 12:30:18 +0000
> From: cferriby at gmail.com
> Subject: [poppler] windows python gtk bindings
> To: poppler at lists.freedesktop.org
> Message-ID: <90e6ba4fc38245e9e0048bbcbb25 at google.com>
> Content-Type: text/plain; charset="iso-8859-1"; Format="flowed";
>        DelSp="yes"
>
> Hi i was wondering were i could get windows python bindings? i was looking
> into using the python bindings for evince in my gtk app but also figured if
> i could get the poppler bindings either would work. are they packed in the
> tarball already? i know the gtk bindings are but i dontl know what language
> they are for. thanks in advance for any help
>
>
> Cory
> -------------- next part --------------
> An HTML attachment was scrubbed...
> URL: <
> http://lists.freedesktop.org/archives/poppler/attachments/20100719/f7baf022/attachment.htm
> >
>
> ------------------------------
>
> Message: 2
> Date: Mon, 19 Jul 2010 16:19:18 +0100
> From: Albert Astals Cid <aacid at kde.org>
> Subject: Re: [poppler] windows python gtk bindings
> To: poppler at lists.freedesktop.org
> Message-ID: <201007191619.18289.aacid at kde.org>
> Content-Type: Text/Plain;  charset="us-ascii"
>
> A Dilluns, 19 de juliol de 2010, cferriby at gmail.com va escriure:
> > Hi i was wondering were i could get windows python bindings? i was
> looking
> > into using the python bindings for evince in my gtk app but also figured
> if
> > i could get the poppler bindings either would work. are they packed in
> the
> > tarball already? i know the gtk bindings are but i dontl know what
> language
> > they are for. thanks in advance for any help
>
> The poppler team does not provide any python binding so we don't know the
> answer, no idea if whoever does the python binding is lurking around
> though.
>
> Albert
>
> >
> >
> > Cory
>
>
> ------------------------------
>
> Message: 3
> Date: Mon, 19 Jul 2010 16:31:34 +0100
> From: Albert Astals Cid <aacid at kde.org>
> Subject: Re: [poppler] Killing exception support
> To: poppler at lists.freedesktop.org
> Message-ID: <201007191631.34472.aacid at kde.org>
> Content-Type: Text/Plain;  charset="us-ascii"
>
> A Dilluns, 12 de juliol de 2010, Albert Astals Cid va escriure:
> > Hi, would anyone disagree about killing exception support? The exception
> > support we have in gmem is very limited and we actually we do not support
> > it correctly since in the poppler core code we have some
> > gmalloc_checkoverlow that expect NULL on failure, not an exception.
> >
> > Comments?
>
> Noone complained thus i'm killing them as of now.
>
> Albert
>
> >
> > Albert
> > _______________________________________________
> > poppler mailing list
> > poppler at lists.freedesktop.org
> > http://lists.freedesktop.org/mailman/listinfo/poppler
>
>
> ------------------------------
>
> Message: 4
> Date: Mon, 19 Jul 2010 08:32:50 -0700 (PDT)
> From: aacid at kemper.freedesktop.org (Albert Astals Cid)
> Subject: [poppler] 2 commits - CMakeLists.txt config.h.cmake
>        configure.ac    .gitignore goo/gmem.cc goo/gmem.h
>        poppler/poppler-config.h.cmake poppler/poppler-config.h.in
> To: poppler at lists.freedesktop.org
> Message-ID: <20100719153250.E3FF710057 at kemper.freedesktop.org>
>
>  .gitignore                     |    7 +++++
>  CMakeLists.txt                 |    1
>  config.h.cmake                 |    3 --
>  configure.ac                   |    4 --
>  goo/gmem.cc                    |   56
> +++++++++++------------------------------
>  goo/gmem.h                     |   38 ++++++++-------------------
>  poppler/poppler-config.h.cmake |    5 ---
>  poppler/poppler-config.h.in    |    5 ---
>  8 files changed, 34 insertions(+), 85 deletions(-)
>
> New commits:
> commit 49ffb46db3118db874d2d9830bb034762d625c61
> Author: Albert Astals Cid <aacid at kde.org>
> Date:   Mon Jul 19 16:31:54 2010 +0100
>
>    Remove exception support
>
>    We don't use it and don't even support it properly
>
> diff --git a/CMakeLists.txt b/CMakeLists.txt
> index a11d96c..916a780 100644
> --- a/CMakeLists.txt
> +++ b/CMakeLists.txt
> @@ -31,7 +31,6 @@ option(ENABLE_LIBOPENJPEG "Use libopenjpeg for JPX
> streams." ON)
>  option(ENABLE_LCMS "Use liblcms for color management." ON)
>  option(ENABLE_LIBCURL "Build libcurl based HTTP support." OFF)
>  option(ENABLE_ZLIB "Build with zlib (not totally safe)." OFF)
> -option(USE_EXCEPTIONS "Throw exceptions to deal with not enough memory and
> similar problems." OFF)
>  option(USE_FIXEDPOINT "Use fixed point arithmetic in the Splash backend"
> OFF)
>  option(USE_FLOAT "Use single precision arithmetic in the Splash backend"
> OFF)
>  if(WIN32)
> diff --git a/config.h.cmake b/config.h.cmake
> index 0879aeb..123288a 100644
> --- a/config.h.cmake
> +++ b/config.h.cmake
> @@ -171,9 +171,6 @@
>  /* Defines if use cms */
>  #cmakedefine USE_CMS 1
>
> -/* Throw exceptions to deal with not enough memory and similar problems */
> -#cmakedefine USE_EXCEPTIONS 1
> -
>  /* Use fixed point arithmetic in the Splash backend */
>  #cmakedefine USE_FIXEDPOINT 1
>
> diff --git a/configure.ac b/configure.ac
> index 060028f..a1a5d02 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -108,10 +108,6 @@ dnl ##### Checks for header files.
>  AC_PATH_XTRA
>  AC_HEADER_DIRENT
>
> -AC_ARG_ENABLE(exceptions,
> -             [  --enable-exceptions     use C++ exceptions],
> -             AC_DEFINE([USE_EXCEPTIONS], [1], [Throw exceptions to deal
> with not enough memory and similar problems]))
> -
>  dnl ##### Switch over to C++.  This will make the checks below a little
>  dnl ##### bit stricter (requiring function prototypes in include files).
>  dnl ##### (99% of xpdf is written in C++.)
> diff --git a/goo/gmem.cc b/goo/gmem.cc
> index af3e19e..ff0703b 100644
> --- a/goo/gmem.cc
> +++ b/goo/gmem.cc
> @@ -14,7 +14,7 @@
>  // under GPL version 2 or later
>  //
>  // Copyright (C) 2005 Takashi Iwai <tiwai at suse.de>
> -// Copyright (C) 2007-2009 Albert Astals Cid <aacid at kde.org>
> +// Copyright (C) 2007-2010 Albert Astals Cid <aacid at kde.org>
>  // Copyright (C) 2008 Jonathan Kew <jonathan_kew at sil.org>
>  //
>  // To see a description of the changes please see the Changelog file that
> @@ -63,7 +63,7 @@ static int gMemInUse = 0;
>
>  #endif /* DEBUG_MEM */
>
> -inline static void *gmalloc(size_t size, bool checkoverflow) GMEM_EXCEP {
> +inline static void *gmalloc(size_t size, bool checkoverflow) {
>  #ifdef DEBUG_MEM
>   int size1;
>   char *mem;
> @@ -76,13 +76,9 @@ inline static void *gmalloc(size_t size, bool
> checkoverflow) GMEM_EXCEP {
>   }
>   size1 = gMemDataSize(size);
>   if (!(mem = (char *)malloc(size1 + gMemHdrSize + gMemTrlSize))) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Out of memory\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   hdr = (GMemHdr *)mem;
>   data = (void *)(mem + gMemHdrSize);
> @@ -112,27 +108,23 @@ inline static void *gmalloc(size_t size, bool
> checkoverflow) GMEM_EXCEP {
>     return NULL;
>   }
>   if (!(p = malloc(size))) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Out of memory\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   return p;
>  #endif
>  }
>
> -void *gmalloc(size_t size) GMEM_EXCEP {
> +void *gmalloc(size_t size) {
>   return gmalloc(size, false);
>  }
>
> -void *gmalloc_checkoverflow(size_t size) GMEM_EXCEP {
> +void *gmalloc_checkoverflow(size_t size) {
>   return gmalloc(size, true);
>  }
>
> -inline static void *grealloc(void *p, size_t size, bool checkoverflow)
> GMEM_EXCEP {
> +inline static void *grealloc(void *p, size_t size, bool checkoverflow) {
>  #ifdef DEBUG_MEM
>   GMemHdr *hdr;
>   void *q;
> @@ -169,27 +161,23 @@ inline static void *grealloc(void *p, size_t size,
> bool checkoverflow) GMEM_EXCE
>     q = malloc(size);
>   }
>   if (!q) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Out of memory\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   return q;
>  #endif
>  }
>
> -void *grealloc(void *p, size_t size) GMEM_EXCEP {
> +void *grealloc(void *p, size_t size) {
>   return grealloc(p, size, false);
>  }
>
> -void *grealloc_checkoverflow(void *p, size_t size) GMEM_EXCEP {
> +void *grealloc_checkoverflow(void *p, size_t size) {
>   return grealloc(p, size, true);
>  }
>
> -inline static void *gmallocn(int nObjs, int objSize, bool checkoverflow)
> GMEM_EXCEP {
> +inline static void *gmallocn(int nObjs, int objSize, bool checkoverflow) {
>   int n;
>
>   if (nObjs == 0) {
> @@ -197,48 +185,40 @@ inline static void *gmallocn(int nObjs, int objSize,
> bool checkoverflow) GMEM_EX
>   }
>   n = nObjs * objSize;
>   if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Bogus memory allocation size\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   return gmalloc(n, checkoverflow);
>  }
>
> -void *gmallocn(int nObjs, int objSize) GMEM_EXCEP {
> +void *gmallocn(int nObjs, int objSize) {
>   return gmallocn(nObjs, objSize, false);
>  }
>
> -void *gmallocn_checkoverflow(int nObjs, int objSize) GMEM_EXCEP {
> +void *gmallocn_checkoverflow(int nObjs, int objSize) {
>   return gmallocn(nObjs, objSize, true);
>  }
>
> -inline static void *gmallocn3(int a, int b, int c, bool checkoverflow)
> GMEM_EXCEP {
> +inline static void *gmallocn3(int a, int b, int c, bool checkoverflow) {
>   int n = a * b;
>   if (b <= 0 || a < 0 || a >= INT_MAX / b) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Bogus memory allocation size\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   return gmallocn(n, c, checkoverflow);
>  }
>
> -void *gmallocn3(int a, int b, int c) GMEM_EXCEP {
> +void *gmallocn3(int a, int b, int c) {
>   return gmallocn3(a, b, c, false);
>  }
>
> -void *gmallocn3_checkoverflow(int a, int b, int c) GMEM_EXCEP {
> +void *gmallocn3_checkoverflow(int a, int b, int c) {
>   return gmallocn3(a, b, c, true);
>  }
>
> -inline static void *greallocn(void *p, int nObjs, int objSize, bool
> checkoverflow) GMEM_EXCEP {
> +inline static void *greallocn(void *p, int nObjs, int objSize, bool
> checkoverflow) {
>   int n;
>
>   if (nObjs == 0) {
> @@ -249,22 +229,18 @@ inline static void *greallocn(void *p, int nObjs, int
> objSize, bool checkoverflo
>   }
>   n = nObjs * objSize;
>   if (objSize <= 0 || nObjs < 0 || nObjs >= INT_MAX / objSize) {
> -#if USE_EXCEPTIONS
> -    throw GMemException();
> -#else
>     fprintf(stderr, "Bogus memory allocation size\n");
>     if (checkoverflow) return NULL;
>     else exit(1);
> -#endif
>   }
>   return grealloc(p, n, checkoverflow);
>  }
>
> -void *greallocn(void *p, int nObjs, int objSize) GMEM_EXCEP {
> +void *greallocn(void *p, int nObjs, int objSize) {
>   return greallocn(p, nObjs, objSize, false);
>  }
>
> -void *greallocn_checkoverflow(void *p, int nObjs, int objSize) GMEM_EXCEP
> {
> +void *greallocn_checkoverflow(void *p, int nObjs, int objSize) {
>   return greallocn(p, nObjs, objSize, true);
>  }
>
> diff --git a/goo/gmem.h b/goo/gmem.h
> index ea75fb9..405c829 100644
> --- a/goo/gmem.h
> +++ b/goo/gmem.h
> @@ -14,7 +14,7 @@
>  // under GPL version 2 or later
>  //
>  // Copyright (C) 2005 Takashi Iwai <tiwai at suse.de>
> -// Copyright (C) 2007-2009 Albert Astals Cid <aacid at kde.org>
> +// Copyright (C) 2007-2010 Albert Astals Cid <aacid at kde.org>
>  // Copyright (C) 2008 Jonathan Kew <jonathan_kew at sil.org>
>  //
>  // To see a description of the changes please see the Changelog file that
> @@ -28,22 +28,6 @@
>  #include <stdio.h>
>  #include "poppler/poppler-config.h"
>
> -#if USE_EXCEPTIONS
> -
> -class GMemException {
> -public:
> -  GMemException() {}
> -  ~GMemException() {}
> -};
> -
> -#define GMEM_EXCEP throw(GMemException)
> -
> -#else // USE_EXCEPTIONS
> -
> -#define GMEM_EXCEP
> -
> -#endif // USE_EXCEPTIONS
> -
>  #ifdef __cplusplus
>  extern "C" {
>  #endif
> @@ -52,15 +36,15 @@ extern "C" {
>  * Same as malloc, but prints error message and exits if malloc()
>  * returns NULL.
>  */
> -extern void *gmalloc(size_t size) GMEM_EXCEP;
> -extern void *gmalloc_checkoverflow(size_t size) GMEM_EXCEP;
> +extern void *gmalloc(size_t size);
> +extern void *gmalloc_checkoverflow(size_t size);
>
>  /*
>  * Same as realloc, but prints error message and exits if realloc()
>  * returns NULL.  If <p> is NULL, calls malloc instead of realloc().
>  */
> -extern void *grealloc(void *p, size_t size) GMEM_EXCEP;
> -extern void *grealloc_checkoverflow(size_t size) GMEM_EXCEP;
> +extern void *grealloc(void *p, size_t size);
> +extern void *grealloc_checkoverflow(size_t size);
>
>  /*
>  * These are similar to gmalloc and grealloc, but take an object count
> @@ -70,12 +54,12 @@ extern void *grealloc_checkoverflow(size_t size)
> GMEM_EXCEP;
>  * The gmallocn_checkoverflow variant returns NULL instead of exiting
>  * the application if a overflow is detected
>  */
> -extern void *gmallocn(int nObjs, int objSize) GMEM_EXCEP;
> -extern void *gmallocn_checkoverflow(int nObjs, int objSize) GMEM_EXCEP;
> -extern void *gmallocn3(int a, int b, int c) GMEM_EXCEP;
> -extern void *gmallocn3_checkoverflow(int a, int b, int c) GMEM_EXCEP;
> -extern void *greallocn(void *p, int nObjs, int objSize) GMEM_EXCEP;
> -extern void *greallocn_checkoverflow(void *p, int nObjs, int objSize)
> GMEM_EXCEP;
> +extern void *gmallocn(int nObjs, int objSize);
> +extern void *gmallocn_checkoverflow(int nObjs, int objSize);
> +extern void *gmallocn3(int a, int b, int c);
> +extern void *gmallocn3_checkoverflow(int a, int b, int c);
> +extern void *greallocn(void *p, int nObjs, int objSize);
> +extern void *greallocn_checkoverflow(void *p, int nObjs, int objSize);
>
>  /*
>  * Same as free, but checks for and ignores NULL pointers.
> diff --git a/poppler/poppler-config.h.cmake
> b/poppler/poppler-config.h.cmake
> index d049a12..2243498 100644
> --- a/poppler/poppler-config.h.cmake
> +++ b/poppler/poppler-config.h.cmake
> @@ -19,11 +19,6 @@
>  #cmakedefine MULTITHREADED 1
>  #endif
>
> -/* Enable exceptions. */
> -#ifndef USE_EXCEPTIONS
> -#cmakedefine USE_EXCEPTIONS 1
> -#endif
> -
>  /* Use fixedpoint. */
>  #ifndef USE_FIXEDPOINT
>  #cmakedefine USE_FIXEDPOINT 1
> diff --git a/poppler/poppler-config.h.in b/poppler/poppler-config.h.in
> index 6fa873e..cc531e3 100644
> --- a/poppler/poppler-config.h.in
> +++ b/poppler/poppler-config.h.in
> @@ -19,11 +19,6 @@
>  #undef MULTITHREADED
>  #endif
>
> -/* Enable exceptions. */
> -#ifndef USE_EXCEPTIONS
> -#undef USE_EXCEPTIONS
> -#endif
> -
>  /* Use fixedpoint. */
>  #ifndef USE_FIXEDPOINT
>  #undef USE_FIXEDPOINT
> commit dd2e9399868e3dbf2fa4ede050f8d74d29ebbbb4
> Author: Albert Astals Cid <aacid at kde.org>
> Date:   Mon Jul 19 16:31:43 2010 +0100
>
>    add uninstalled.pc to ignore
>
> diff --git a/.gitignore b/.gitignore
> index d000352..39728b4 100644
> --- a/.gitignore
> +++ b/.gitignore
> @@ -25,3 +25,10 @@ poppler.pc
>  stamp-h1
>  gtk-doc.make
>  *.o
> +poppler-cairo-uninstalled.pc
> +poppler-cpp-uninstalled.pc
> +poppler-glib-uninstalled.pc
> +poppler-qt-uninstalled.pc
> +poppler-qt4-uninstalled.pc
> +poppler-splash-uninstalled.pc
> +poppler-uninstalled.pc
>
>
> ------------------------------
>
> _______________________________________________
> poppler mailing list
> poppler at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/poppler
>
>
> End of poppler Digest, Vol 65, Issue 32
> ***************************************
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/poppler/attachments/20100719/41afc1a4/attachment-0001.html>


More information about the poppler mailing list