Concatenating PDFs

I found a great article to help me with creating the newsletter for our Sparks/AWANA club this month:

Easy way to concatenate PDF files in Ubuntu Linux

First, I had to trim off the last page of the newsletter.  I opened the PDF in Evince and printed it to a file, PDF format, pages 1-3 (not page 4).  That gave me a PDF with just the first 3 pages.

Next, I opened the orginal PDF with Gimp and imported only page 4.  That gave me a graphic of the last page, and I saved that as a PNG file.  Then, I created a new Open Office Drawing and inserted that PNG file as the background in the drawing.  (The last page of the newsletter is just an outline for you to add your own club-specific content.)  I added the news items for a our club and saved the last page as a PDF.

Finally, I used this command to build the final PDF:

gs -q -sPAPERSIZE=letter -dNOPAUSE -dBATCH -sDEVICE=pdfwrite -sOutputFile=Oct-Complete.pdf Oct-Part.pdf Oct.pdf

That was it!  Please comment if you know better ways to do this sort of thing.

Leave a Comment

Your email address will not be published.