zeldor.biz

Linux, programming and more

Copyright © 2025
Log in

Combine PDFs

March 14, 2013 by Igor Drobot Leave a Comment

pdf-logo

Storing and archiving of invoices can be very tiring.
From each contract I receive for each month a PDF.
During a year 12 pdfs from jan. – dec. * amount of contracts = hundreds of PDFs.

Yeap solution is to merging multiple pdf files into one:)

PDFtk in an Open Source tool for manipulating PDF documents.

1
apt-get update && apt-get install pdftk

apt-get update && apt-get install pdftk

Example:

1
pdftk 01.pdf 02.pdf 03.pdf 04.pdf 05.pdf 06.pdf 07.pdf 08.pdf 09.pdf 10.pdf 11.pdf 12.pdf output 2012.pdf

pdftk 01.pdf 02.pdf 03.pdf 04.pdf 05.pdf 06.pdf 07.pdf 08.pdf 09.pdf 10.pdf 11.pdf 12.pdf output 2012.pdf

1
2
3
4
5
6
7
8
9
10
11
12
13
14
32274 Sep  7 13:45 01.pdf
32507 Sep  7 13:45 02.pdf
32587 Sep  7 13:45 03.pdf
32751 Sep  7 13:43 04.pdf
32915 Sep  7 13:43 05.pdf
32993 Sep  7 13:43 06.pdf
32878 Sep  7 13:43 07.pdf
32826 Sep  7 13:43 08.pdf
32838 Sep  7 13:43 09.pdf
32935 Oct  1 11:33 10.pdf
32838 Jan 11 13:09 11.pdf
32935 Jan 11 12:29 12.pdf
 
366284 Mar  8 15:56 2012.pdf

32274 Sep 7 13:45 01.pdf 32507 Sep 7 13:45 02.pdf 32587 Sep 7 13:45 03.pdf 32751 Sep 7 13:43 04.pdf 32915 Sep 7 13:43 05.pdf 32993 Sep 7 13:43 06.pdf 32878 Sep 7 13:43 07.pdf 32826 Sep 7 13:43 08.pdf 32838 Sep 7 13:43 09.pdf 32935 Oct 1 11:33 10.pdf 32838 Jan 11 13:09 11.pdf 32935 Jan 11 12:29 12.pdf 366284 Mar 8 15:56 2012.pdf

At the end you have a single PDF file on all your single PDFs.

pdftk can more, it can extract single pages of a big PDF info a new one.

Example: PDF contains 7 pages, but you need only the first one and the last one so you extract them and build a new PDF with page one and seven.

1
pdftk 2010.pdf cat 1 7 output mynewfile.pdf

pdftk 2010.pdf cat 1 7 output mynewfile.pdf

Filed Under: Linux Tagged With: manipulate, PDF, pdftk

Categories

Archives

Tags

apache2 Apple arduino ARM Automation backup bash Cisco Cluster Corosync Database Debian Debian squeeze DIY DNS Fedora FTP Fun Icinga Ipv6 KVM Linux LVM MAC OS X Monitoring MySQL Nagios Nginx openSUSE OpenVPN PHP Proxy Python python3 qemu RAID rsync Samba security ssh Ubuntu virtualization Windows Windows 7 Wordpress

Leave a Reply

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

Yeaaah Cookie! We use cookies to ensure that we give you the best experience on our website. If you continue to use this site we will assume that you are happy with it.Ok