There are additional issues with poppler 0.12 which is in unstable now:
g++ -DHAVE_CONFIG_H -I. -I../../../source/texk/web2c -I./..
-I/tmp/buildd/luatex-0.43.0/build/texk -I/tmp/buildd/luatex-0.43.0/source/texk
-DPOPPLER_VERSION=\"0.12.0\" -I/usr/include/poppler
-I/tmp/buildd/luatex-0.43.0/build/libs/obsdcompat
-I/tmp/buildd/luatex-0.43.0/source/libs/obsdcompat
-I../../../source/texk/web2c/libmd5 -Iluatexdir
-I../../../source/texk/web2c/luatexdir
-I../../../source/texk/web2c/luatexdir/lua51 -DpdfTeX -g -O2 -MT
libluatex_a-pdftoepdf.o -MD -MP -MF .deps/libluatex_a-pdftoepdf.Tpo -c -o
libluatex_a-pdftoepdf.o `test -f 'luatexdir/image/pdftoepdf.cc' || echo
'../../../source/texk/web2c/'`luatexdir/image/pdftoepdf.cc
/usr/include/poppler/GfxFont.h: In function 'void
writeEncodings(pdf_output_file*)':
/usr/include/poppler/GfxFont.h:230: error: 'virtual GfxFont::~GfxFont()' is
protected
../../../source/texk/web2c/luatexdir/image/pdftoepdf.cc:675: error: within this
context
../../../source/texk/web2c/luatexdir/image/pdftoepdf.cc: In function 'void
read_pdf_info(pdf_output_file*, image_dict*, integer, integer)':
../../../source/texk/web2c/luatexdir/image/pdftoepdf.cc:730: error: 'class
PDFDoc' has no member named 'getPDFVersion'
make[6]: *** [libluatex_a-pdftoepdf.o] Error 1
Attached are the patches (ubuntu_libpoppler-0.11 and
ubuntu_libpoppler-0.12) used in Ubuntu to deal with this.
For Ubuntu context see:
https://bugs.launchpad.net/bugs/381539
https://bugs.launchpad.net/bugs/453929
I'm also attaching a second version of the patch for poppler 0.12
(libpoppler-0.12), in the hope that it will be more acceptable for
upstream (the patch for Ubuntu was designed to make only a minimal
change). None of the patches includes a poppler version check; maybe it
should be added.
Index: luatex-0.40.5/source/texk/web2c/luatexdir/image/pdftoepdf.cc
===================================================================
--- luatex-0.40.5.orig/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-10-19 22:03:14.000000000 +0400
+++ luatex-0.40.5/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-10-19 22:03:14.000000000 +0400
@@ -705,7 +705,8 @@
Page *page;
int rotate;
PDFRectangle *pagebox;
- float pdf_version_found, pdf_version_wanted, xsize, ysize, xorig, yorig;
+ unsigned major_pdf_version_found, minor_pdf_version_found;
+ float xsize, ysize, xorig, yorig;
assert(idict != NULL);
assert(img_type(idict) == IMG_TYPE_PDF);
// initialize
@@ -720,15 +721,18 @@
// this works only for PDF 1.x -- but since any versions of PDF newer
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
// then have to changed drastically anyway.
- pdf_version_found = pdf_doc->doc->getPDFVersion();
- pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
- if (pdf_version_found > pdf_version_wanted + 0.01) {
+ major_pdf_version_found = pdf_doc->doc->getPDFMajorVersion();
+ minor_pdf_version_found = pdf_doc->doc->getPDFMinorVersion();
+ if (major_pdf_version_found > 1 ||
+ (major_pdf_version_found == 1 &&
+ minor_pdf_version_found > minor_pdf_version_wanted)
+ ) {
char msg[] =
- "PDF inclusion: found PDF version <%.1f>, but at most version <%.1f> allowed";
+ "PDF inclusion: found PDF version <%u.%u>, but at most version <1.%i> allowed";
if (pdf_inclusion_errorlevel > 0) {
- pdftex_fail(msg, pdf_version_found, pdf_version_wanted);
+ pdftex_fail(msg, major_pdf_version_found, minor_pdf_version_found, minor_pdf_version_wanted);
} else {
- pdftex_warn(msg, pdf_version_found, pdf_version_wanted);
+ pdftex_warn(msg, major_pdf_version_found, minor_pdf_version_found, minor_pdf_version_wanted);
}
}
img_totalpages(idict) = pdf_doc->doc->getCatalog()->getNumPages();
Fix a FTBFS with libpoppler 0.11: the destructor of GfxFont is virtual, and it doesn't make sense to call it.
Index: luatex-0.40.1/source/texk/web2c/luatexdir/image/pdftoepdf.cc
===================================================================
--- luatex-0.40.1.orig/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-05-29 04:39:57.000000000 +0000
+++ luatex-0.40.1/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-05-29 04:42:24.000000000 +0000
@@ -666,7 +666,7 @@
}
for (r = encodingList; r != NULL; r = n) {
n = r->next;
- delete r->font;
+// delete r->font;
delete r;
}
}
Index: luatex-0.40.5/source/texk/web2c/luatexdir/image/pdftoepdf.cc
===================================================================
--- luatex-0.40.5.orig/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-10-17 16:32:12.000000000 +0400
+++ luatex-0.40.5/source/texk/web2c/luatexdir/image/pdftoepdf.cc 2009-10-17 16:32:12.000000000 +0400
@@ -720,7 +720,7 @@
// this works only for PDF 1.x -- but since any versions of PDF newer
// than 1.x will not be backwards compatible to PDF 1.x, pdfTeX will
// then have to changed drastically anyway.
- pdf_version_found = pdf_doc->doc->getPDFVersion();
+ pdf_version_found = pdf_doc->doc->getPDFMajorVersion() + 0.1 * pdf_doc->doc->getPDFMinorVersion();
pdf_version_wanted = 1 + (minor_pdf_version_wanted * 0.1);
if (pdf_version_found > pdf_version_wanted + 0.01) {
char msg[] =