<html>
<head>
<meta content="text/html; charset=ISO-8859-1"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Am 16.09.2013 09:41, schrieb Lu Wang:<br>
</div>
<blockquote
cite="mid:CAG9B1ipVasvWidKOKK6C9QsKA6SCcRfHWZRRMcy=KDQLZ1Usyw@mail.gmail.com"
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>
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
cite="mid:CAG9B1ipVasvWidKOKK6C9QsKA6SCcRfHWZRRMcy=KDQLZ1Usyw@mail.gmail.com"
type="cite">
<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 class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
poppler mailing list
<a class="moz-txt-link-abbreviated" href="mailto:poppler@lists.freedesktop.org">poppler@lists.freedesktop.org</a>
<a class="moz-txt-link-freetext" href="http://lists.freedesktop.org/mailman/listinfo/poppler">http://lists.freedesktop.org/mailman/listinfo/poppler</a>
</pre>
</blockquote>
<br>
</body>
</html>