Re: [poppler] Fix building static libraries with cmake

2017-11-01 Thread Albert Astals Cid
El dimecres, 1 de novembre de 2017, a les 11:55:41 CET, Jeroen Ooms va 
escriure:
> Several projects use static builds of poppler-cpp to ship standalone
> pdf applications, but since the switch to cmake it is no longer
> possible to build static libs.
> 
> Setting -DBUILD_SHARED_LIBS=OFF in cmake only builds a static
> libpoppler.a, however libpoppler-cpp still gets built as a dynamic
> library (because SHARED is hardcoded in CMakeLists.txt).
> 
> It would be really great of cmake could build both the static and the
> shared libraries, like many other C/C++ libs do. The patch below
> implements this:
> 
>   Human readable view:
> https://github.com/tsdgeos/poppler_mirror/pull/2/files Patch file:
> https://github.com/tsdgeos/poppler_mirror/pull/2.patch
> 
> What can I do to get this patch reviewed?

Not put it in my github mirror.

Email here or use bugzillla.

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] How to set custom 'share' directory

2017-11-01 Thread Jeroen Ooms
On Wed, Nov 1, 2017 at 3:51 PM, Jason Crain  wrote
>
> I don't know how you use poppler in your project, but you may also have
> the option of passing in the path when you construct the GlobalParams
> object.


Hmm that may be the function I am looking for but I don't understand
where I should pass a GlobalParams object when reading a pdf file. I
tried setting the 'globalParams' global when loading the R package but
that doesn't seem to work:

   globalParams = new GlobalParams(path.c_str());

Should I be passing the path to the "share" path or the
"share/poppler" path? FWIW our bindings are quite simple wrappers for
the cpp api: https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] How to set custom 'share' directory

2017-11-01 Thread Jason Crain
On Wed, Nov 01, 2017 at 03:34:36PM +0100, Jeroen Ooms wrote:
> On Wed, Nov 1, 2017 at 3:20 PM, Jason Crain  wrote:
> 
> > On Mac and Linux the path is hardcoded at compilation time.  It's
> > generally in /usr/share/poppler on Linux.  Not sure what the standard is
> > on Mac.  On Windows it looks in \share\poppler relative to the
> > installation directory.
> 
> OK that is unfortunate. Would it be possible to introduce an option to
> set this path dynamically at runtime; e.g via an environment variable
> or via an api call?
> 
> In our case we statically link libpoppler with the R bindings on
> MacOS/Windows. This works very well for users, but there isn't a fixed
> installation directory; it depends on where the user installs the R
> package. So it would be really nice if there is a way to point
> libpoppler to the correct path when the R package gets loaded, rather
> than hardcoding this at build-time.
> 

I don't know how you use poppler in your project, but you may also have
the option of passing in the path when you construct the GlobalParams
object.
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] How to set custom 'share' directory

2017-11-01 Thread Jeroen Ooms
On Wed, Nov 1, 2017 at 3:20 PM, Jason Crain  wrote:

> On Mac and Linux the path is hardcoded at compilation time.  It's
> generally in /usr/share/poppler on Linux.  Not sure what the standard is
> on Mac.  On Windows it looks in \share\poppler relative to the
> installation directory.

OK that is unfortunate. Would it be possible to introduce an option to
set this path dynamically at runtime; e.g via an environment variable
or via an api call?

In our case we statically link libpoppler with the R bindings on
MacOS/Windows. This works very well for users, but there isn't a fixed
installation directory; it depends on where the user installs the R
package. So it would be really nice if there is a way to point
libpoppler to the correct path when the R package gets loaded, rather
than hardcoding this at build-time.
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


Re: [poppler] How to set custom 'share' directory

2017-11-01 Thread Jason Crain
On Wed, Nov 01, 2017 at 02:19:36PM +0100, Jeroen Ooms wrote:
> I maintain the poppler bindings for R which work on Windows, MacOS and
> Linux. However Chineese users on Windows/Mac have reported that
> poppler doesn't find the share data files:
> 
>   error: Missing language pack for 'Adobe-CNS1' mapping
> 
> Where exactly does poppler look for the 'share' directory? Is there an
> environment variable or libpoppler API that I can use to specify this
> location?

The encoding files are in the poppler-data package, not the poppler
package.  Likely your users need to install poppler-data.

On Mac and Linux the path is hardcoded at compilation time.  It's
generally in /usr/share/poppler on Linux.  Not sure what the standard is
on Mac.  On Windows it looks in \share\poppler relative to the
installation directory.
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler


[poppler] How to set custom 'share' directory

2017-11-01 Thread Jeroen Ooms
I maintain the poppler bindings for R which work on Windows, MacOS and
Linux. However Chineese users on Windows/Mac have reported that
poppler doesn't find the share data files:

  error: Missing language pack for 'Adobe-CNS1' mapping

Where exactly does poppler look for the 'share' directory? Is there an
environment variable or libpoppler API that I can use to specify this
location?

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


[poppler] Fix building static libraries with cmake

2017-11-01 Thread Jeroen Ooms
Several projects use static builds of poppler-cpp to ship standalone
pdf applications, but since the switch to cmake it is no longer
possible to build static libs.

Setting -DBUILD_SHARED_LIBS=OFF in cmake only builds a static
libpoppler.a, however libpoppler-cpp still gets built as a dynamic
library (because SHARED is hardcoded in CMakeLists.txt).

It would be really great of cmake could build both the static and the
shared libraries, like many other C/C++ libs do. The patch below
implements this:

  Human readable view: https://github.com/tsdgeos/poppler_mirror/pull/2/files
  Patch file: https://github.com/tsdgeos/poppler_mirror/pull/2.patch

What can I do to get this patch reviewed?
___
poppler mailing list
poppler@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/poppler