So, my situation was that I wanted to check whether the credit card bill amount I was receiving was valid. I wanted to calculated for myself. The problem was that the pdf credit card statement being sent out by my bank was password and signature protected. It wouldnt allow copying text from it, which is rather weird. I have a genuine need to archive the pdf without password because after a couple of months, who’s going to remember what password it had, especially if you have a couple of different cards, each with its own password schema?
So the first step was to remove the password from it:
Install and run qpdf:
apt-get install qpdf qpdf -decrypt --password=mypassword /mnt/c/temp/899XXXXXXXXXX32_11-02-2017.PDF /mnt/c/temp/1.pdf
This removes the password. The signature is still intact, but hooray, the pdf now allows copying text from it. I paste the text into my favorite text editor, and use a perl script to calculate for me.
Joel G Mathew, known in tech circles by the pseudonym Droidzone, is an opensource and programming enthusiast.
His favorite pastime is grappling with GNU compilers, discovering newer Linux secrets, writing scripts, hacking roms, and programs (nothing illegal), reading, blogging. and testing out the latest gadgets.
When away from the tech world, Dr Joel G. Mathew is a practising ENT Surgeon, busy with surgeries and clinical practise.