Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc

2016-09-28 Thread Adrian Johnson
I am planning to rework the patch when I get time.

On 29/09/16 06:50, Albert Astals Cid wrote:
> Is there so much C++11 need there that you can't have the feature without it?
> 
> Cheers,
>   Albert
> 
> El dimarts, 27 de setembre de 2016, a les 20:41:49 CEST, Adrian Johnson va 
> escriure:
>>  cmake/modules/PopplerMacros.cmake |2
>>  configure.ac  |1
>>  utils/pdfinfo.1   |4 -
>>  utils/pdfinfo.cc  |  140
>> -- 4 files changed, 2 insertions(+),
>> 145 deletions(-)
>>
>> New commits:
>> commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1
>> Author: Adrian Johnson 
>> Date:   Wed Sep 28 06:10:20 2016 +0930
>>
>> Revert "pdfinfo: add -dests option to print named destinations"
>>
>> This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35.
>>
>> diff --git a/cmake/modules/PopplerMacros.cmake
>> b/cmake/modules/PopplerMacros.cmake index e9b75b9..6cadf40 100644
>> --- a/cmake/modules/PopplerMacros.cmake
>> +++ b/cmake/modules/PopplerMacros.cmake
>> @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
>>set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions
>> -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE
>> "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align
>> -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
>> -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
>>
>> -  set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor
>> -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") +  set(CMAKE_CXX_FLAGS   
>> "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}")
>> set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
>>set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG")
>>set(CMAKE_CXX_FLAGS_DEBUG  "-g -O2 -fno-reorder-blocks
>> -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac
>> index 9ce36e1..c4cfc2c 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -85,7 +85,6 @@ AC_ARG_ENABLE(build-type,
>>enable_build_type=no)
>>
>>  if test "x$GCC" = "xyes"; then
>> -CXXFLAGS="-std=c++11 $CXXFLAGS"
>>  case "$enable_build_type" in
>>  relwithdebinfo)
>>  CFLAGS="-O2 -g $CFLAGS"
>> diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1
>> index b699dff..741219f 100644
>> --- a/utils/pdfinfo.1
>> +++ b/utils/pdfinfo.1
>> @@ -113,10 +113,6 @@ Prints dates in ISO-8601 format (including the time
>> zone). .B \-rawdates
>>  Prints the raw (undecoded) date strings, directly from the PDF file.
>>  .TP
>> -.B \-dests
>> -Print a list of all named destinations. If a page range is specified using
>> "\-f" and "\-l", only -destinations in the page range are listed.
>> -.TP
>>  .BI \-enc " encoding-name"
>>  Sets the encoding to use for text output. This defaults to "UTF-8".
>>  .TP
>> diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc
>> index 50e756e..9cfdc0f 100644
>> --- a/utils/pdfinfo.cc
>> +++ b/utils/pdfinfo.cc
>> @@ -36,7 +36,6 @@
>>  #include 
>>  #include 
>>  #include 
>> -#include 
>>  #include "parseargs.h"
>>  #include "printencodings.h"
>>  #include "goo/GooString.h"
>> @@ -78,7 +77,6 @@ static GBool printHelp = gFalse;
>>  static GBool printEnc = gFalse;
>>  static GBool printStructure = gFalse;
>>  static GBool printStructureText = gFalse;
>> -static GBool printDests = gFalse;
>>
>>  static const ArgDesc argDesc[] = {
>>{"-f",  argInt,  ,0,
>> @@ -99,8 +97,6 @@ static const ArgDesc argDesc[] = {
>> "print the dates in ISO-8601 format"},
>>{"-rawdates", argFlag,   , 0,
>> "print the undecoded date strings directly from the PDF file"},
>> -  {"-dests", argFlag,  ,   0,
>> -   "print all named destinations in the PDF"},
>>{"-enc",argString,   textEncName,sizeof(textEncName),
>> "output text encoding name"},
>>{"-listenc",argFlag, ,  0,
>> @@ -293,135 +289,6 @@ static void printStruct(const StructElement *element,
>> unsigned indent) { }
>>  }
>>
>> -struct RefCompare {
>> -  bool operator() (const Ref& lhs, const Ref& rhs) const {
>> -return lhs.num < rhs.num;
>> -  }
>> -};
>> -
>> -struct GooStringCompare {
>> -  bool operator() (GooString* lhs, GooString* rhs) const {
>> -return lhs->cmp(const_cast(rhs)) < 0;
>> -  }
>> -};
>> -
>> -static void printLinkDest(LinkDest *dest) {
>> -  char buf[100];
>> -
>> -  switch (dest->getKind()) {
>> -case destXYZ:
>> -  sprintf(buf, "[ XYZ ");
>> -  if (dest->getChangeLeft()) {
>> -sprintf(buf+strlen(buf), "%4.f ", dest->getLeft());
>> -  } else {
>> -strcat(buf, "null ");
>> -  }
>> -  if (dest->getChangeTop()) {
>> -sprintf(buf+strlen(buf), "%4.f ", dest->getTop());
>> -  } else {
>> -strcat(buf, "null ");
>> -  }
>> -  if (dest->getChangeZoom()) {
>> -sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom());
>> -  } else {

[poppler] CMakeLists.txt configure.ac

2016-09-28 Thread Albert Astals Cid
 CMakeLists.txt |2 +-
 configure.ac   |2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

New commits:
commit 27cf7fabad27648019b36b2d6352e6767bfc8689
Author: Albert Astals Cid 
Date:   Wed Sep 28 23:23:33 2016 +0200

Increase glib requirement

Seems we've been requiring it for a while at least.

See "Build fail on Ubuntu 14.04" thread on the mailing list

diff --git a/CMakeLists.txt b/CMakeLists.txt
index d59a6fc..c86922a 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -96,7 +96,7 @@ set(TEXTOUT_WORD_LIST ON)
 # setting the minimum required versions for some components
 set(QT4_MIN_VERSION "4.7.0")
 set(CAIRO_VERSION "1.10.0")
-set(GLIB_REQUIRED "2.18")
+set(GLIB_REQUIRED "2.41")
 
 macro_bool_to_01(ENABLE_SPLASH HAVE_SPLASH)
 find_package(Freetype REQUIRED)
diff --git a/configure.ac b/configure.ac
index c4cfc2c..f0303e0 100644
--- a/configure.ac
+++ b/configure.ac
@@ -639,7 +639,7 @@ if test x$enable_cairo_output = xyes; then
   POPPLER_GLIB_DISABLE_DEPRECATED=""
   POPPLER_GLIB_DISABLE_SINGLE_INCLUDES=""
 
-  GLIB_REQUIRED=2.18
+  GLIB_REQUIRED=2.41
   AC_SUBST(GLIB_REQUIRED)
   AC_ARG_ENABLE(poppler-glib,
AC_HELP_STRING([--disable-poppler-glib],
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] cmake/modules configure.ac utils/pdfinfo.1 utils/pdfinfo.cc

2016-09-28 Thread Albert Astals Cid
Is there so much C++11 need there that you can't have the feature without it?

Cheers,
  Albert

El dimarts, 27 de setembre de 2016, a les 20:41:49 CEST, Adrian Johnson va 
escriure:
>  cmake/modules/PopplerMacros.cmake |2
>  configure.ac  |1
>  utils/pdfinfo.1   |4 -
>  utils/pdfinfo.cc  |  140
> -- 4 files changed, 2 insertions(+),
> 145 deletions(-)
> 
> New commits:
> commit 86e50e156952713f0ce3ecc7b6f03f06dc0902c1
> Author: Adrian Johnson 
> Date:   Wed Sep 28 06:10:20 2016 +0930
> 
> Revert "pdfinfo: add -dests option to print named destinations"
> 
> This reverts commit 183dbf3249e8db2398b63a749eb010bc0a89dc35.
> 
> diff --git a/cmake/modules/PopplerMacros.cmake
> b/cmake/modules/PopplerMacros.cmake index e9b75b9..6cadf40 100644
> --- a/cmake/modules/PopplerMacros.cmake
> +++ b/cmake/modules/PopplerMacros.cmake
> @@ -104,7 +104,7 @@ if(CMAKE_COMPILER_IS_GNUCXX)
>set(DEFAULT_COMPILE_WARNINGS_YES "-Wall -Wcast-align -fno-exceptions
> -fno-check-new -fno-common") set(DEFAULT_COMPILE_WARNINGS_KDE
> "-Wno-long-long -Wundef -D_XOPEN_SOURCE=600 -D_BSD_SOURCE -Wcast-align
> -Wconversion -Wall -W -Wpointer-arith -Wwrite-strings -Wformat-security
> -Wmissing-format-attribute -fno-exceptions -fno-check-new -fno-common")
> 
> -  set(CMAKE_CXX_FLAGS"-std=c++11 -Wnon-virtual-dtor
> -Woverloaded-virtual ${CMAKE_CXX_FLAGS}") +  set(CMAKE_CXX_FLAGS   
> "-Wnon-virtual-dtor -Woverloaded-virtual ${CMAKE_CXX_FLAGS}")
> set(CMAKE_CXX_FLAGS_RELWITHDEBINFO "-O2 -g")
>set(CMAKE_CXX_FLAGS_RELEASE"-O2 -DNDEBUG")
>set(CMAKE_CXX_FLAGS_DEBUG  "-g -O2 -fno-reorder-blocks
> -fno-schedule-insns -fno-inline") diff --git a/configure.ac b/configure.ac
> index 9ce36e1..c4cfc2c 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -85,7 +85,6 @@ AC_ARG_ENABLE(build-type,
>enable_build_type=no)
> 
>  if test "x$GCC" = "xyes"; then
> -CXXFLAGS="-std=c++11 $CXXFLAGS"
>  case "$enable_build_type" in
>  relwithdebinfo)
>  CFLAGS="-O2 -g $CFLAGS"
> diff --git a/utils/pdfinfo.1 b/utils/pdfinfo.1
> index b699dff..741219f 100644
> --- a/utils/pdfinfo.1
> +++ b/utils/pdfinfo.1
> @@ -113,10 +113,6 @@ Prints dates in ISO-8601 format (including the time
> zone). .B \-rawdates
>  Prints the raw (undecoded) date strings, directly from the PDF file.
>  .TP
> -.B \-dests
> -Print a list of all named destinations. If a page range is specified using
> "\-f" and "\-l", only -destinations in the page range are listed.
> -.TP
>  .BI \-enc " encoding-name"
>  Sets the encoding to use for text output. This defaults to "UTF-8".
>  .TP
> diff --git a/utils/pdfinfo.cc b/utils/pdfinfo.cc
> index 50e756e..9cfdc0f 100644
> --- a/utils/pdfinfo.cc
> +++ b/utils/pdfinfo.cc
> @@ -36,7 +36,6 @@
>  #include 
>  #include 
>  #include 
> -#include 
>  #include "parseargs.h"
>  #include "printencodings.h"
>  #include "goo/GooString.h"
> @@ -78,7 +77,6 @@ static GBool printHelp = gFalse;
>  static GBool printEnc = gFalse;
>  static GBool printStructure = gFalse;
>  static GBool printStructureText = gFalse;
> -static GBool printDests = gFalse;
> 
>  static const ArgDesc argDesc[] = {
>{"-f",  argInt,  ,0,
> @@ -99,8 +97,6 @@ static const ArgDesc argDesc[] = {
> "print the dates in ISO-8601 format"},
>{"-rawdates", argFlag,   , 0,
> "print the undecoded date strings directly from the PDF file"},
> -  {"-dests", argFlag,  ,   0,
> -   "print all named destinations in the PDF"},
>{"-enc",argString,   textEncName,sizeof(textEncName),
> "output text encoding name"},
>{"-listenc",argFlag, ,  0,
> @@ -293,135 +289,6 @@ static void printStruct(const StructElement *element,
> unsigned indent) { }
>  }
> 
> -struct RefCompare {
> -  bool operator() (const Ref& lhs, const Ref& rhs) const {
> -return lhs.num < rhs.num;
> -  }
> -};
> -
> -struct GooStringCompare {
> -  bool operator() (GooString* lhs, GooString* rhs) const {
> -return lhs->cmp(const_cast(rhs)) < 0;
> -  }
> -};
> -
> -static void printLinkDest(LinkDest *dest) {
> -  char buf[100];
> -
> -  switch (dest->getKind()) {
> -case destXYZ:
> -  sprintf(buf, "[ XYZ ");
> -  if (dest->getChangeLeft()) {
> - sprintf(buf+strlen(buf), "%4.f ", dest->getLeft());
> -  } else {
> - strcat(buf, "null ");
> -  }
> -  if (dest->getChangeTop()) {
> - sprintf(buf+strlen(buf), "%4.f ", dest->getTop());
> -  } else {
> - strcat(buf, "null ");
> -  }
> -  if (dest->getChangeZoom()) {
> - sprintf(buf+strlen(buf), "%4.2f ", dest->getZoom());
> -  } else {
> - strcat(buf, "null ");
> -  }
> -  break;
> -case destFit:
> -  sprintf(buf, "[ Fit ");
> -  break;
> -case destFitH:
> -  if (dest->getChangeTop()) {
> - sprintf(buf, "[ FitH %4.f ", 

Re: [poppler] Build fail on Ubuntu 14.04

2016-09-28 Thread Jason Crain
On Wed, Sep 28, 2016 at 08:36:01PM +0200, Albert Astals Cid wrote:
> El dimarts, 27 de setembre de 2016, a les 18:20:43 CEST, Jason Crain va 
> escriure:
> > On Tue, Sep 27, 2016 at 10:31:21PM +0200, Albert Astals Cid wrote:
> > > El dijous, 15 de setembre de 2016, a les 15:30:08 CEST, Jason Crain va
> > > 
> > > escriure:
> > > > On 2016-09-15, Alex Korobkin  wrote:
> > > > > poppler-document.cc:1521:25: error: invalid conversion from 'int' to
> > > > > 'GParamFlags' [-fpermissive]
> > > > > 
> > > > > G_PARAM_READWRITE));
> > > > 
> > > > ...
> > > > 
> > > > > Does it need a newer version of glib-2.0 since 0.47 release? Or am I
> > > > > missing something other library or reference?
> > > > 
> > > > It needs a newer version of glib.  See
> > > > https://bugs.freedesktop.org/97432.
> > > > Old glib has G_PARAM_READWRITE as a #define and C++ doesn't like that.
> > > 
> > > Anyone knows what's that newer glib version so we can update the checks?
> > 
> > It's changed in commit 6c395244, in glib version 2.41.0.
> 
> 6c395244 is our commit hash or glib's?

It's glib's hash: https://git.gnome.org/browse/glib/commit/?id=6c395244
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [Patch] Add 3DPDF interface to glib frontend

2016-09-28 Thread Albert Astals Cid
El dimecres, 14 de setembre de 2016, a les 15:36:14 CEST, IHARA Hiroka va 
escriure:
> Dear poppler maintainers,
> 
> Attached below is a suggested patch (to git master) which adds a binary 
> interface to read directly from 3DD objects carrying U3D or PRC data.
> 
> I am now trying to add 3DPDF support to Evince, and this is meant to be 
> the first step of the improvement.
> 
> Therefore changes are only applied to the glib frontend as for now, and 
> contain minimal updates in functionality, without inspection through the 
> Activation (3DA) Dictionary.
> 
> I promise I will add the rest of the interface after everything is 
> deemed stable in both components, Evince and poppler.
> 
> This is the very first time I ever submit a patch to OSS projects, so 
> there might be problems with what I am doing, though most of the lines 
> are adapted from existing code.
> 
> May I await your approval before commit? I am not familiar with how 
> patches are accepted or rejected here.

I see you opened a bug too, let's have the conversation in there.

Cheers,
  Albert

> 
> Thank you.
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] Build fail on Ubuntu 14.04

2016-09-28 Thread Albert Astals Cid
El dimarts, 27 de setembre de 2016, a les 18:20:43 CEST, Jason Crain va 
escriure:
> On Tue, Sep 27, 2016 at 10:31:21PM +0200, Albert Astals Cid wrote:
> > El dijous, 15 de setembre de 2016, a les 15:30:08 CEST, Jason Crain va
> > 
> > escriure:
> > > On 2016-09-15, Alex Korobkin  wrote:
> > > > poppler-document.cc:1521:25: error: invalid conversion from 'int' to
> > > > 'GParamFlags' [-fpermissive]
> > > > 
> > > > G_PARAM_READWRITE));
> > > 
> > > ...
> > > 
> > > > Does it need a newer version of glib-2.0 since 0.47 release? Or am I
> > > > missing something other library or reference?
> > > 
> > > It needs a newer version of glib.  See
> > > https://bugs.freedesktop.org/97432.
> > > Old glib has G_PARAM_READWRITE as a #define and C++ doesn't like that.
> > 
> > Anyone knows what's that newer glib version so we can update the checks?
> 
> It's changed in commit 6c395244, in glib version 2.41.0.

6c395244 is our commit hash or glib's?

Cheers,
  Albert

> ___
> poppler mailing list
> poppler@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/poppler


___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] [patch] support Mac OS X fonts without fontconfig

2016-09-28 Thread Henrik Grubbström
Hi.

On Fri Jul 31, 2009 Albert Astals Cid wrote:

> Hi, sorry for the late reply

Well, this follow-up is several magnitudes more late...

> A Diumenge, 12 de juliol de 2009, Jonathan Kew va escriure:
> > In order to use poppler on OS X without depending on X11 or
> > fontconfig, which is not a standard component on the Mac, I have
> > implemented a configure option
[...]
> > The attached patch is based on current git head.

It seems that the patch never got committed to the main repository.

I have now forward-ported it so that it merges cleanly with the HEAD
of the current git master branch
(183dbf3249e8db2398b63a749eb010bc0a89dc35).

In the process I've updated it to use the same configuration options as
for the fontconfig/WIN32 selection, as well as attempted to fix the
issues you reported below:

> So comments:
>  * Is there any possibility of me convincing you to also add that switches
>to the CMake build system? If not i or someone else will have to do
>delaying the commiting of the patch

CMakeList.txt updated accordingly. ~7 years is quite a bit of delay...

>  * The license on mac-framework.m4 seems a bit weird to me, but i think
>we can live with it

It looks like it should be compatible with GPL, I did search for an
alternative implementation, but didn't find anything suitable.

>  * You can not include config.h in GlobalParams.h, use the
>poppler-config.h trick

Fixed.

> Overall it looks okaish from the "i don't use Mac so i don't care much" POV
>
> Albert

The updated patch is available as the branch macosx from
https://github.com/grubba/poppler .

/grubba

-- 
Henrik Grubbström   gru...@grubba.org
Roxen Internet Software AB  gru...@roxen.com
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler