<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"><!-- P {margin-top:0;margin-bottom:0;} --></style>
</head>
<body dir="ltr">
<div id="divtagdefaultwrapper" style="font-size:12pt;color:#000000;font-family:Calibri,Helvetica,sans-serif;" dir="ltr">
<p>><span>where I should pass a GlobalParams object when reading a pdf file</span><br>
<br>
You can look at utility programs like <span>utils/pdftops.cc</span></p>
<p><span>I think that globalParams is a global variable, see <span>poppler/GlobalParams.cc and <span>poppler/GlobalParams.h , so you just set it before you do anything else with poppler and you don't have to pass it.</span></span></span></p>
<p><span><span><span></span></span></span></p>
<p><span><span><span>Regards, William</span></span></span></p>
<br>
<br>
<div style="color: rgb(0, 0, 0);">
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> poppler <poppler-bounces@lists.freedesktop.org> on behalf of Jeroen Ooms <jeroen@berkeley.edu><br>
<b>Sent:</b> Wednesday, November 1, 2017 4:31 PM<br>
<b>To:</b> Jason Crain<br>
<b>Cc:</b> poppler@lists.freedesktop.org<br>
<b>Subject:</b> Re: [poppler] How to set custom 'share' directory</font>
<div> </div>
</div>
<div class="BodyFragment"><font size="2"><span style="font-size:10pt;">
<div class="PlainText">On Wed, Nov 1, 2017 at 3:51 PM, Jason Crain <jason@inspiresomeone.us> wrote<br>
><br>
> I don't know how you use poppler in your project, but you may also have<br>
> the option of passing in the path when you construct the GlobalParams<br>
> object.<br>
<br>
<br>
Hmm that may be the function I am looking for but I don't understand<br>
where I should pass a GlobalParams object when reading a pdf file. I<br>
tried setting the 'globalParams' global when loading the R package but<br>
that doesn't seem to work:<br>
<br>
   globalParams = new GlobalParams(path.c_str());<br>
<br>
Should I be passing the path to the "share" path or the<br>
"share/poppler" path? FWIW our bindings are quite simple wrappers for<br>
the cpp api: <a href="https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp" id="LPlnk47756" previewremoved="true">
https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp</a>
<div id="LPBorder_GT_15096002082500.14471123236548933" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15096002082450.5306513415870728" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="ImageCell_15096002082470.41283061235541707" colspan="1" style="width: 250px; position: relative; display: table-cell; padding-right: 20px;">
<div id="LPImageContainer_15096002082470.7393864302835567" style="background-color: rgb(255, 255, 255); height: 250px; position: relative; margin: auto; display: table; width: 250px;">
<a id="LPImageAnchor_15096002082470.08959158966297331" href="https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp" target="_blank" style="display: table-cell; text-align: center;"><img id="LPThumbnailImageID_15096002082470.3616275804427349" width="250" height="250" style="display: inline-block; max-width: 250px; max-height: 250px; height: 250px; width: 250px; border-width: 0px; vertical-align: bottom;" src="https://avatars3.githubusercontent.com/u/1200269?v=4&s=400"></a></div>
</td>
<td id="TextCell_15096002082480.7280195422627938" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15096002082480.8336192921492811"></div>
<div id="LPTitle_15096002082480.3799907213668685" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15096002082480.673201455302533" href="https://github.com/ropensci/pdftools/blob/master/src/bindings.cpp" target="_blank" style="text-decoration: none;">pdftools/bindings.cpp at master · ropensci/pdftools · GitHub</a></div>
<div id="LPMetadata_15096002082490.7934917799445806" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
github.com</div>
<div id="LPDescription_15096002082490.7546463454430672" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
pdftools - Text Extraction, Rendering and Converting of PDF Documents</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
_______________________________________________<br>
poppler mailing list<br>
poppler@lists.freedesktop.org<br>
<a href="https://lists.freedesktop.org/mailman/listinfo/poppler" id="LPlnk837325" previewremoved="true">https://lists.freedesktop.org/mailman/listinfo/poppler</a>
<div id="LPBorder_GT_15096002372380.9757374275125812" style="margin-bottom: 20px; overflow: auto; width: 100%; text-indent: 0px;">
<table id="LPContainer_15096002372320.7005663078787414" role="presentation" cellspacing="0" style="width: 90%; background-color: rgb(255, 255, 255); position: relative; overflow: auto; padding-top: 20px; padding-bottom: 20px; margin-top: 20px; border-top: 1px dotted rgb(200, 200, 200); border-bottom: 1px dotted rgb(200, 200, 200);">
<tbody>
<tr valign="top" style="border-spacing: 0px;">
<td id="TextCell_15096002372340.8999624315064463" colspan="2" style="vertical-align: top; position: relative; padding: 0px; display: table-cell;">
<div id="LPRemovePreviewContainer_15096002372340.7534325767442542"></div>
<div id="LPTitle_15096002372340.8610639578802801" style="top: 0px; color: rgb(0, 120, 215); font-weight: 400; font-size: 21px; font-family: wf_segoe-ui_light, "Segoe UI Light", "Segoe WP Light", "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; line-height: 21px;">
<a id="LPUrlAnchor_15096002372350.9777140476839346" href="https://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank" style="text-decoration: none;">poppler Info Page - freedesktop.org</a></div>
<div id="LPMetadata_15096002372360.4862354518973018" style="margin: 10px 0px 16px; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 14px;">
lists.freedesktop.org</div>
<div id="LPDescription_15096002372370.16731660250427405" style="display: block; color: rgb(102, 102, 102); font-weight: 400; font-family: wf_segoe-ui_normal, "Segoe UI", "Segoe WP", Tahoma, Arial, sans-serif; font-size: 14px; line-height: 20px; max-height: 100px; overflow: hidden;">
Subscribing to poppler: Subscribe to poppler by filling out the following form. Use of all freedesktop.org lists is subject to our Code of ...</div>
</td>
</tr>
</tbody>
</table>
</div>
<br>
<br>
</div>
</span></font></div>
</div>
</div>
</body>
</html>