[cl-pdf-devel] Concatenating PDF files

Edi Weitz edi at agharta.de
Mon Nov 14 20:08:19 UTC 2005


Hi!

I need to concatenate a couple of PDF files, i.e. if I have PDF A with
10 pages, PDF B with 5 pages, and PDF C with 8 pages, then the
resulting PDF should have 23 pages where page 1 is page 1 of PDF A,
page 11 is page 1 of PDF B, and so on.  The pages are supposed to
remain unchanged /except/ for the page numbers which should be updated
accordingly.

I talked about this briefly with Arthur Lemmens and he said that the
part with the page numbers will probably be hard and that there's no
general solution for it.  (I had naïvely assumed that the PDF format
had some mechanism to abstract away page numbers like Word but now
that I think of it this is most likely nonsense.)

Nevertheless, at the moment I don't even know enough of CL-PDF to be
able to concatenate the files without wading through the source code
for a couple of hours.  So, if someone could provide me with some
lines of example code to get me started I'd be /very/ thankful.

I know about this tool

  <http://thierry.schmit.free.fr/dev/mbtPdfAsm/enMbtPdfAsm2.html>

but I'd rather do it all in Lisp if possible.

Thanks in advance,
Edi.

PS: Marc, Arthur is not in contributors.txt - I think he provided the
    parser, didn't he?



More information about the cl-pdf-devel mailing list