[tex-k] libpoppler support in TeX Live source tree

The Thanh Han hanthethanh at gmail.com
Thu May 7 21:23:27 CEST 2009

Hi Norbert,

On Wed, May 06, 2009 at 10:14:24PM +0200, The Thanh Han wrote:
> Hi Norbert,
> On Tue, May 05, 2009 at 11:58:04PM +0200, Norbert Preining wrote:
> > > Another workaround is to maintain a separate tree for
> > > pdftosrc; this patch would be applied to a (temporary)
> > > XRef.cc & XRef.h during compilation of pdftosrc. Sounds a
> > > bit awkward, but IMO better than changing the original
> > > XRef.{cc,h}.
> > 
> > What about the patch I proposed that, when compiling with poppler
> > (or/and maybe also with xpdf) instead of including XRef.h we include the
> > fixed version of it? I must honestly say I don't know what are the
> > consequences of *NOT* having the .cc part of the patch applied:
> >
> > [...]
> >
> > So is there a chance to have that "feature" only for the version
> > compiled with the patched xpdf in the texlive tree, and a version
> > without that "feature" when compiled with poppler? That would be another
> > option.
> without the change to XRef.cc, pdftosrc will compile fine
> but will not work as expected, ie it doesn't support object
> stream. Not that it's an important thing, but having
> different behaviour of the same program, depending on
> whether it's linked against xpdf or poppler doesn't seem
> better than not having it at all.
> Maybe someone else will come up with an idea how to do that
> better...

I think for your purpose it suffices to add something like
this to pdftosrc.cc:main():

#ifdef POPPLER
    fprintf(sdterr, "warning: this version of pdftosrc doesn't support object stream (use pdftosrc from TeX Live if you need it)");

so that if someone happens to use pdftosrc, he/she will be


More information about the tex-k mailing list