[tldistro] libxpdf vs poppler

Alexis Ballier aballier at gentoo.org
Sun Apr 20 16:14:35 CEST 2008


Hi,

> 2008/4/15, Norbert Preining <preining at logic.at>:
> > Putting TeX Live head on: We follow upstream in this respect, i.e.,
> > if pdftex starts to support libpoppler TeX Live will follow. But
> > this will not happen soon, AFAIR. But Martin might prove me wrong.
> 
> I've laid the groundwork in pdfTeX 1.50:
> http://foundry.supelec.fr/plugins/scmsvn/viewcvs.php/trunk/source/src/texk/web2c/pdftexdir/pdflib.h?root=pdftex&view=markup
> http://foundry.supelec.fr/plugins/scmsvn/viewcvs.php/trunk/source/src/texk/web2c/pdftexdir/pdflib.cc?root=pdftex&view=markup
> 
> That's IMHO a clean interface between pdftex and xpdf; it should be
> easy for someone interested and knowing poppler to adopt it to
> poppler. Not me, but I'm willing to help.

Good ! Thanks for the hints.
So I've started to hack into pdftex trunk a little bit and came up with
a patch to make it use poppler, thanks to your new interface ;)

Its enclosed to this mail, but let me detail it a bit:
It adds a configure option --with-poppler to make it use poppler
instead of xpdf; for now this will probably break everything but
pdftex in texlive that uses xpdf.
The checks for poppler can probably be improved (like not using
pkgconfig as afaict it would be the only one in texlive that uses it;
and definitely not using it for the first time under an 'if' without
initialising it with PKG_PROG_PKG_CONFIG somewhere else).

It hacks in the new interface with #defines to directly use poppler's
classes instead of wrapping them. I'm not sure if that's the best idea
ever... but this avoids lots of #if for GString vs GooString

The ObjectStream problem was due to pdftosrc using it to dump pdf's
xref tables. The good news is that poppler xref class has a writetofile
function that does the job for us ;) So, instead of hacking in poppler,
I've used that function. The "problem" is that the output is not the
same as with xpdf plus the pdftosrc computations. I'm not enough at ease
with the pdf format to know whether its an equivalent output or not.

Even if I dont consider that patch thoroughly tested on my side, pdftex
seems to perform nicely with it (poppler 0.6.3).

Regards,

Alexis.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: pdftex_trunk_use_poppler.patch
Type: text/x-patch
Size: 5375 bytes
Desc: not available
Url : http://tug.org/pipermail/tldistro/attachments/20080420/3b300bbb/attachment.bin 
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
Url : http://tug.org/pipermail/tldistro/attachments/20080420/3b300bbb/attachment-0001.bin 


More information about the tldistro mailing list