Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Are there any Perl scripts/modules for concatenating PDF files?
I have found examples of scripts which wrap around "Acrobat Exchange", but I only have "Acrobat Reader" available.
I'm sitting on Windows 98 with Perl v5.8.0.
TVM.

Replies are listed 'Best First'.
Re: Concatenating PDF files
by tbone1 (Monsignor) on Jan 14, 2004 at 14:04 UTC

    I used PDF from CPAN a while back, and while I can't specifically remember a concatenation feature, I do know that what I used worked well. If you are doing ANY work with PDF files, it's worth a looksee.

    (Boy, that's a fairly weak recommendation, he said upon re-reading this.)

    --
    tbone1
    And remember, if he succeeds, so what.
    - Chick McGee

      There might also be an alternative way : concatenating Postscript files and then converting them to PDF. Anyway, it is better to search in the LINUX community since they happened to be using PS files for more time than any other people.

      If there is a way of doing it with Postscript files then it should be easy to translate into PDF (see PS2PDF, etc.).

      There are many projects dealing with PDF in Sourceforge.

Re: Concatenating PDF files
by Anonymous Monk on Jan 14, 2004 at 12:55 UTC
    Searching CPAN I found PDF::Reuse, which seems to be a possibility.
    I remember doing the same thing with a module with an easier interface, but I cannot remember its name.

    Hope this helped,

    CombatSquirrel
Re: Concatenating PDF files
by stvn (Monsignor) on Jan 14, 2004 at 16:37 UTC

    Try PDFlib, I have used them many times before. Its fast and reliable. They offer a number of features, one of which is "concatenating" PDFs. The drawback is that you have to pay for that feature, check the site for more info.

    -stvn
Re: Concatenating PDF files
by rob_au (Abbot) on Jan 14, 2004 at 22:15 UTC
    I have posted a script for concatenating both whole PDF files and selected pages of PDF files at PDF Concatenation and Extraction Tool which may of use to you in your task.

     

    perl -le "print unpack'N', pack'B32', '00000000000000000000001010101101'"