>where I should pass a GlobalParams object when reading a pdf file

You can look at utility programs like utils/pdftops.cc

I think that globalParams is a global variable, see poppler/GlobalParams.cc and 
poppler/GlobalParams.h , so you just set it before you do anything else with 
poppler and you don't have to pass it.

Regards, William


________________________________
From: poppler <[email protected]> on behalf of Jeroen Ooms 
<[email protected]>
Sent: Wednesday, November 1, 2017 4:31 PM
To: Jason Crain
Cc: [email protected]
Subject: Re: [poppler] How to set custom 'share' directory

On Wed, Nov 1, 2017 at 3:51 PM, Jason Crain <[email protected]> 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
[https://avatars3.githubusercontent.com/u/1200269?v=4&s=400]<https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp>

pdftools/bindings.cpp at master · ropensci/pdftools · 
GitHub<https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp>
github.com
pdftools - Text Extraction, Rendering and Converting of PDF Documents



_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler
poppler Info Page - 
freedesktop.org<https://lists.freedesktop.org/mailman/listinfo/poppler>
lists.freedesktop.org
Subscribing to poppler: Subscribe to poppler by filling out the following form. 
Use of all freedesktop.org lists is subject to our Code of ...



_______________________________________________
poppler mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/poppler

Reply via email to