[poppler] How to set custom 'share' directory

William Bader williambader at hotmail.com
Thu Nov 2 05:35:50 UTC 2017


>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 <poppler-bounces at lists.freedesktop.org> on behalf of Jeroen Ooms <jeroen at berkeley.edu>
Sent: Wednesday, November 1, 2017 4:31 PM
To: Jason Crain
Cc: poppler at lists.freedesktop.org
Subject: Re: [poppler] How to set custom 'share' directory

On Wed, Nov 1, 2017 at 3:51 PM, Jason Crain <jason at inspiresomeone.us> 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
poppler at lists.freedesktop.org
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 ...



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/poppler/attachments/20171102/d89a9a17/attachment.html>


More information about the poppler mailing list