[poppler] How to set custom 'share' directory

Jeroen Ooms jeroen at berkeley.edu
Sat Nov 4 19:21:28 UTC 2017

On Wed, Nov 1, 2017 at 9:31 PM, Jeroen Ooms <jeroen at berkeley.edu> wrote:
> 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

After some trial and error I have figured out that GlobalParams does
work but it must be called after reading the document. If I first call
new GlobalParams(path.c_str()) and then document::load_from_raw_data()
it does not work. But if I first call GlobalParams, then load the
document, and then get the text, it uses the poppler_data as specified
in path.c_str().

Not sure if this is intended but I can make it work now.

More information about the poppler mailing list