Here are source files to interpret and modify PDF.
In Jan. 2019, with Debian buster then in a late
prerelease stage of development, update_catalog.cc
and PDF.cc were minimally but still fairly extensively
revised to track libpoppler-private-dev, version 0.69.
The combination of [a] layered revisions over
decades (during which standard C++ has significantly
advanced) to track an advertisedly unstable
private Poppler API and [b] Thaddeus H. Black's once
immature C++ coding style (for this code was one of the
projects by which Thaddeus first learned C++) leaves
the code in an interesting state, doesn't it?
Realistically, the code will probably never be cleaned
up. It works.
Compared against version 0.48 of
libpoppler-private-dev (issued with Debian stretch),
version 0.69 handles its Object type differently,
inverting the Object's manner of association to types
like Dict. This seems to represent an improvement but
of course such improvements will break code like the
present code that relies upon them. For better or
worse, one suspects that more such breaking changes
will come. For one, types like Dict might be made to
inherit from Object (will they? unknown, but they
might). Derivations shall have to keep up.
In case Poppler's developers or package maintainers
read this, Thaddeus' view is that breaking changes of
the aforementioned kind are right, though Thaddeus does
not particularly enjoy tracking them! At some future
date, it would be nice if the private Poppler API would
stabilize (presumably then becoming nonprivate), but
Poppler probably wants more development before
that occurs. Poppler is useful software, devs. Keep
working on it.
For information, it appears that the code in the
present directory was first introduced in Sept. 2007.