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 |
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 |
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 |
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 |
Leave a Reply