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

Norbert Preining preining at logic.at
Tue May 5 23:58:04 CEST 2009


Hi Thanh,

On Di, 05 Mai 2009, The Thanh Han wrote:
> this sounds very similar to a patch I made to xpdf, to
> support object stream for pdftosrc. Below I copied the
> relevant text I sent in a previous mail to Peter and others.

Ahhhhhh, that explains loads of things, especially why it didn't show up
in poppler.

> I suggested to remove support for object stream from
> pdftosrc (or remove pdftosrc), so that we can get rid of
> this patch. But Peter and Karl don't think it's a good idea.
> So we need to maintain this patch for both xpdf and poppler
> it seems.

I leave that to them, cannot (since I never used pdftosrc) decide on it.

> 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:

> | @@ -80,6 +106,7 @@
> |    nObjects = 0;
> |    objs = NULL;
> |    objNums = NULL;
> | +  offsets = NULL;
> |
> |    if (!xref->fetch(objStrNum, 0, &objStr)->isStream()) {
> |      goto err1;
> | @@ -100,6 +127,7 @@
> |      goto err1;
> |    }
> |    first = obj1.getInt();
> | +  firstOffset = objStr.getStream()->getBaseStream()->getStart() + first;
> |    obj1.free();
> |    if (first < 0) {
> |      goto err1;
> | @@ -121,7 +149,7 @@
> |        obj1.free();
> |        obj2.free();
> |        delete parser;
> | -      gfree(offsets);
> | +//       gfree(offsets);
> |        goto err1;
> |      }
> |      objNums[i] = obj1.getInt();

etc

> This change is "nice-to-have", but not a critical one.

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.

Best wishes

Norbert

-------------------------------------------------------------------------------
Dr. Norbert Preining <preining at logic.at>        Vienna University of Technology
Debian Developer <preining at debian.org>                         Debian TeX Group
gpg DSA: 0x09C5B094      fp: 14DF 2E6C 0307 BE6D AD76  A9C0 D2BF 4AA3 09C5 B094
-------------------------------------------------------------------------------
ESHER (n.)
One of those push tapes installed in public washrooms enabling the
user to wash their trousers without actually getting into the
basin. The most powerful esher of recent years was 'damped down' by
Red Adair after an incredible sixty-eight days' fight in Manchester's
Piccadilly Station.
			--- Douglas Adams, The Meaning of Liff


More information about the tex-k mailing list