Long Term Electronic Storage of Purchase Receipts

Written by James McDonald

March 2, 2012

Bunnings Warehouse an Australian hardware supplier prints purchase receipts that have a tendency to fade to the point of being unreadable. The rate at which they fade seems to depend on how much light they get and how much heat they have to endure. The problem is that they can fade to the point of being unreadable before the warranty period of the item you purchased has expired leaving you with no proof-of-purchase.

So it’s little wonder that the helpful Bunnings staff recommend that you photocopy or scan a copy for safe keeping just in case you need to make a warranty claim. In the case of my Ozito Cordless Drill the warranty period is 3 years so I want to keep an PDF scan which I can find later on no matter how badly I name the file or how unlikely the place I store it.

So I want to associate enough metadata with the PDF scan to be able to find it no matter where on my hard disk or email system I put it.

Using pdftk and a blog post here I have managed to add enough metadata to my scanned image PDF.

View the current metadata of a PDF File

pdftk  2012-03-01\ Ozita\ Cordless\ Drill\ Receipe\ Purchase.pdf dump_data
InfoKey: Creator
InfoValue: pdftk 1.44 - www.pdftk.com
InfoKey: Producer
InfoValue: iText 2.1.7 by 1T3XT
InfoKey: ModDate
InfoValue: D:20120302124912+11'00'
InfoKey: CreationDate
InfoValue: D:20120302124912+11'00'
PdfID0: f69871608a40b62f1b8bbf5b2258c7b0
PdfID1: e39c3b61b8499f98dad9610ba2ef65a
NumberOfPages: 1

Create a text file with the metadata you want to attach to the PDF file (I named it meta_data.txt)

InfoKey: Title
InfoValue: Bunning Warehouse Receipt for Ozito Drill Purchased Thurs Mar 1 2012
InfoKey: Subject
InfoValue: Bunnings Warehouse Receipt
InfoKey: Keywords
InfoValue: Bunnings, Ozito, Cordless Drill, Scan, Tools
InfoKey: Author
InfoValue: James McDonald

Attach the metadata to the PDF File

# command spread over two lines for readability
pdftk 2012-03-01\ Ozita\ Cordless\ Drill\ Receipe\ Purchase.pdf update_info meta_data.txt \
output 2012-03-01\ Ozita\ Cordless\ Drill\ Receipe\ Purchase-with_metadata.pdf

View of all metadata once you have used pdftk update_info


pdftk 2012-03-01\ Ozita\ Cordless\ Drill\ Receipe\ Purchase-with_metadata.pdf dump_data
InfoKey: Creator
InfoValue: pdftk 1.44 - www.pdftk.com
InfoKey: Title
InfoValue: Bunning Warehouse Receipt for Ozito Drill Purchased Thurs Mar 1 2012
InfoKey: Author
InfoValue: James McDonald
InfoKey: Producer
InfoValue: iText 2.1.7 by 1T3XT
InfoKey: Keywords
InfoValue: Bunnings, Ozito, Cordless Drill, Scan, Tools
InfoKey: Subject
InfoValue: Bunnings Warehouse Receipt
InfoKey: ModDate
InfoValue: D:20120302125354+11'00'
InfoKey: CreationDate
InfoValue: D:20120302124912+11'00'
PdfID0: 8585c68b455aa94444d321b3fd17e54
PdfID1: ea7ed3e17b3691283f630f2e97ea6ac
NumberOfPages: 1

Note: pdftk (PDF Toolkit) is cross platform so I believe you can do the above on Linux, Windows and Mac.

0 Comments

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…

Squarespace Image Export

To gain continued access to your Squarespace website images after cancelling your subscription you have several...

MySQL 8.x GRANT ALL STATEMENT

-- CREATE CREATE USER 'tgnrestoreuser'@'localhost' IDENTIFIED BY 'AppleSauceLoveBird2024'; GRANT ALL PRIVILEGES ON...

Exetel Opt-Out of CGNAT

If your port forwards and inbound and/or outbound site-to-site VPN's have failed when switching to Exetel due to their...