[reportlab-users] Need to append two pdf's together &/or append pages to the end of an existing PDF file.

Andy Robinson reportlab-users@reportlab.com
Fri, 9 Jul 2004 01:34:24 +0100


> from reading the PDF language documentation, this shouldn't be
> too difficult to do for simple page management.
>

It looks like it isn't too hard and you might get away with
the obvious approach for simple documents.

But if you want to correctly cover all cases, including one
page referring to other forms nested N levels deep; one document
referencing a different subset of a font than another; all
possible naming clashes between resources in the two PDFs; and lots
of other wrinkles, then its actually rather hard.  Not to mention
finding other sources of PDFs that don't work quite like Adobe's -
we've recently had fun with OpenOffice output.

The only safe approach is to fully parse and 'cross-reference' the PDFs
you are slurping in and check every data structure against the
PDF spec.  You may have noticed that there are not
many open source PDF libraries which do this - it's not easy!

We regard PageCatcher as a major competitive edge for our Enterprise
framework.  It's also the key piece of some substantial server side
solutions we sell for five figures, which we could not sell if PageCatcher
was free.  However, we are happy to work our very reasonable deals for its
use, or to offer under charitable/academic licenses, provided the users have
the basic Python knowledge not to be a burden.  Just ask :-)

Best Regards,

Andy Robinson