Written by James McDonald

December 12, 2014

I wanted to join multiple pdf files together. I usually have used pdftk but it has been retired. You can get a pdftk source rpm but it depends on gcj and several other packages that have been superseded in Fedora 21.

So an alternative is needed…

# install poppler-utils
yum install poppler-utils
# use the pdfunite command to join the pdfs
pdfunite pdf1.pdf pdf2.pdf output.pdf



  1. David Levner

    The perl package PDF::API2 can also be used to create replacement programs for pdftk. I also needed a script that merged PDF files, so I wrote the following pdf-merge.pl:

    use English;
    use strict;
    use PDF::API2;

    my $output_pdf_file_name = pop @ARGV;
    if (not @ARGV) {die "usage: perl $PROGRAM_NAME input-pdf-file ... input-pdf-file output-pdf-file\n";}

    my $output_pdf = PDF::API2->new(-file => $output_pdf_file_name);
    while (@ARGV)
    my $input_pdf = PDF::API2->open(shift @ARGV);
    my $number_of_input_pages = $input_pdf->pages();
    for (my $page_number = 1; $page_number importpage($input_pdf, $page_number, 0);
    } # for $page_number
    } # while

    exit 0;

    • David Levner

      Cut and paste didn’t work too well. Nor did the “code” and “/code” tags that I tried to place around the perl code. And, of course, the HTML obliterated my indentation.

      The inner loop should look like this:

      for (my $page_number = 1; $page_number importpage($input_pdf, $page_number, 0);
          } # for $page_number

      If this doesn’t look right, I’m not fixing it again.

  2. HM

    None of these utils allows manipulating pdf passwords, which is mostly what I use pdftk for.

    • James

      So hopefully someone will update the spec file for the PDFtk to allow building under Fedora 21.


Submit a Comment

Your email address will not be published. Required fields are marked *

This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

The reCAPTCHA verification period has expired. Please reload the page.

You May Also Like…

Meraki Open Source Licenses

Until today I assumed that Meraki was built in-house with only closed source software. But having a look at the...


If you have Veeam backup failing with the Updating BCD failed with Cannot update SafeBoot flag and SentinelOne is...