Package: cups Version: 1.5.0-8 Severity: wishlist Tags: patch Hi,
as like the best traditions, (at least) every new stable serie of Poppler breaks some API wrt previous versions. I'm going through all the failures that Poppler 0.18 would cause in sources currently in Debian, and cups in one of these. (Note I'm not planning a Poppler 0.18 upload in the short term.) I found two issues in the filters locally added in Debian (hence this Debian report and not an upstream one), in particular in the pdftoopvp one. 1) Dropped Link class In Poppler 0.18 the Link class has been dropped[1] in favour of AnnotLink (given links are an own annotation type); this causes an error in OPVPOutputDev because of "undeclared Link". Link is used only in the (empty) reimplementation of the correspondent function of OutputDev... which is not existing anymore. Basically, upstream commit bf7e0e98[2] merged the Xpdf 3.02 code, which (among the other things) gets rid of OutputDev::drawLink(). The first version of Poppler carrying this change was 0.6.0, which has been released approx. in the middle of 2007. Considering that the drawLink() in OPVPOutputDev does nothing just like the implementation in OutputDev, I suggest to just drop OPVPOutputDev::drawLink(). Attached there is patch cups-poppler-0.18-drawLink.diff for it, which should be compatible with Poppler 0.16.x (so you can apply it already). [1] http://cgit.freedesktop.org/poppler/poppler/commit/?id=664865a2ddca9c20ac36a41aef52ebf12eab838d [2] http://cgit.freedesktop.org/poppler/poppler/commit/?id=bf7e0e980bf29994021cb1228f89f582adddf284 2) Different SplashFontEngine constructor signature In Poppler 0.17, the SplashFontEngine constructor got a new parameter, "GBool enableSlightHinting": // Create a font engine. SplashFontEngine( #if HAVE_T1LIB_H GBool enableT1lib, #endif #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H GBool enableFreeType, GBool enableFreeTypeHinting, + GBool enableSlightHinting, #endif GBool aa); .... which specifies whether do slight hinting for font rendering. Attached patch cups-poppler-0.18-SplashFontEngine.diff for it, but unfortunately this is *not* compatible with Poppler 0.16. I guess there should be some configure check for it, but at the moment I'm not too sure on how to do that. As long as you implement something to make it compile with any Poppler version (thus making cups fully binNMUable for a future Poppler 0.18 transition), I'm happy :). Please do note that I can just test that patches can compile with new Poppler, not really printing... Thanks for reading this long report, -- Pino
--- a/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.h +++ b/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.h @@ -83,9 +83,6 @@ public: // End a page. virtual void endPage(); - //----- link borders - virtual void drawLink(Link *link, Catalog *catalog); - //----- save/restore graphics state virtual void saveState(GfxState *state); virtual void restoreState(GfxState *state); --- a/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.cxx +++ b/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.cxx @@ -323,9 +323,6 @@ void OPVPOutputDev::endPage() { oprs->endPage(); } -void OPVPOutputDev::drawLink(Link *link, Catalog *catalog) { -} - void OPVPOutputDev::saveState(GfxState *state) { oprs->saveState(); }
--- a/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.cxx +++ b/debian/local/filters/pdf-filters/pdftoopvp/OPVPOutputDev.cxx @@ -273,6 +273,7 @@ void OPVPOutputDev::startDoc(XRef *xrefA #if HAVE_FREETYPE_FREETYPE_H || HAVE_FREETYPE_H globalParams->getEnableFreeType(), gFalse, + gFalse, #endif globalParams->getAntialias()); for (i = 0; i < nT3Fonts; ++i) {