Good morning,
How do I analyse 3 pages at a time, using the one function?
Thanks for all suggestions,
Alec Taylor
FYI: You'll find my attempt below
[utils/pdftohtml.cc]
<snipped>
GBool analyseThree(PDFDoc*, SplashOutputDev*, int, int, int);
int main(int argc, char *argv[]) {
<snipped>
for (int pg = firstPage; pg <= lastPage; ++pg) {
if(!generateHeaderFooter)
doc->displayPage(splashOut, pg,
72 * scale, 72 * scale,
0, gTrue, gFalse, gFalse);
else
if(pg+1<lastPage && pg+2<lastPage)
analyseThree(*doc, *splashOut, pg, pg+1, pg+2);
SplashBitmap *bitmap = splashOut->getBitmap();
imgFileName = GooString::format("{0:s}{1:03d}.{2:s}",
htmlFileName->getCString(), pg, extension);
bitmap->writeImgFile(format, imgFileName->getCString(),
72 * scale, 72 * scale);
delete imgFileName;
}
<snipped>
GBool analyseThree(PDFDoc *doc, SplashOutputDev *splashOut, int first,
int second, int third) {
doc->displayPage(splashOut, first, 72 * scale, 72 * scale, 0,
gTrue, gFalse, gFalse);
doc->displayPage(splashOut, second, 72 * scale, 72 * scale, 0,
gTrue, gFalse, gFalse);
doc->displayPage(splashOut, third, 72 * scale, 72 * scale, 0,
gTrue, gFalse, gFalse);
return gTrue;
}
_______________________________________________
poppler mailing list
[email protected]
http://lists.freedesktop.org/mailman/listinfo/poppler