<div dir="ltr"><div><div><div><div><div><div>Hi Thomas, <br><br></div> Thanks for your prompt reply!<br><br></div> I actually want to go several passes over the pdf file, e.g. one pass for text and another pass for image.<br>
<br></div> The recursive calls are not essential, but might be a little bit convenient in my case. But I'll just separate both calls then, since it is not well protected by design.<br><br><br></div> Thanks!<br><br>
<br></div> regards,<br></div> - Lu Wang<br></div><div class="gmail_extra"><br><br><div class="gmail_quote">On Mon, Sep 16, 2013 at 3:56 PM, Thomas Freitag <span dir="ltr"><<a href="mailto:thomas.freitag.bbr@gmail.com" target="_blank">thomas.freitag.bbr@gmail.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">
<div text="#000000" bgcolor="#FFFFFF">
<div>Am <a href="tel:16.09.2013" value="+8616092013" target="_blank">16.09.2013</a> 09:41, schrieb Lu Wang:<br>
</div><div class="im">
<blockquote type="cite">
<div dir="ltr">
<div>
<div>
<div>
<div>
<div>
<div>
<div>Hi all,<br>
<br>
</div>
I need to call PDFDoc::displayPage inside a call
of displayPage, something like<br>
<br>
/////////////////////////////////////////////<br>
</div>
<div>class MyOutputDev1{<br>
</div>
<div>public:<br>
void startPage(){<br>
</div>
<div> MyOutputDev2 * dev;<br>
</div>
<div> doc->displayPage(dev, ...);<br>
</div>
<div>}<br>
</div>
<div>};<br>
</div>
<div><br>
</div>
<div>MyOutputDev1 * dev;<br>
</div>
doc->displayPage(dev, ...);<br>
/////////////////////////////////////////////<br>
<br>
</div>
Since PDFDoc::displayPage is not a `const` function,
I'm not sure if there will be a problem to do like this,
althought I guess so.<br>
</div>
</div>
</div>
</div>
</div>
</blockquote></div>
I'm wondering, why You need that, but nevertheless, be careful, at
least, if You call displayPage inside another call of displayPage:
Since reading a document was not stateless in the past (stream
handling! I'm not sure if Adam's last changes to make it thread safe
heals it), You should at least use different instances of the output
device and use copies of xref instances. Have a look into
pdftoppm.cc in the USE_THREAD branches which makes page rendering
thread safe!<br>
<br>
Cheers,<br>
Thomas<br>
<blockquote type="cite"><div class="im">
<div dir="ltr">
<div>
<div>
<div>
<div><br>
</div>
Can any one please help?<br>
<br>
<br>
</div>
Thanks a lot!<br>
<br>
<br>
</div>
regards,<br>
</div>
- Lu Wang<br>
<div>
<div>
<div>
<div>
<div>
<div><br>
<br>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset></fieldset>
<br>
</div><pre>_______________________________________________
poppler mailing list
<a href="mailto:poppler@lists.freedesktop.org" target="_blank">poppler@lists.freedesktop.org</a>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a>
</pre>
</blockquote>
<br>
</div>
<br>_______________________________________________<br>
poppler mailing list<br>
<a href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a><br>
<a href="http://lists.freedesktop.org/mailman/listinfo/poppler" target="_blank">http://lists.freedesktop.org/mailman/listinfo/poppler</a><br>
<br></blockquote></div><br></div>