Satya's blog - PDFJoin and why it does not work

Feb 23 2008 09:45 PDFJoin and why it does not work

I usually use pdfjoin from the pdfjam package to concatenate the PDF statements that I download from my credit card and utility web sites. (They're then symmetrically encrypted with GPG, so settle down.)

Of late, pdfjoin has been making output PDFs that are blank. Apparently this is because the web sites are now producing PDF 1.5, not 1.4, and pdftex (which is in pdfjoin's toolchain) doesn't like that. After some messing about with pdfminorversion in pdftexconfig.tex, which didn't work, I converted the downloaded PDF to postscript and then back to PDF. I checked it for lossage, and then used pdfjoin. pdfjoined worked fine.

Sigh. Why does this stuff have to suck? Sure, in a pinch I can just store the individual files but that means encrypting them separately, a pain to type the passphrase so many times. On the other hand, I rarely need to decrypt multiple statements, which can also be done as follows, so individual files isn't that big a deal. These files tend to be small (few tens of kilobytes), and I don't like having lots of small files, but hey, such is life. Un-tested code follows.

for i in *.pdf.gpg;do gpg -d --passphrase PASSPHRASE_STRING $i > `echo $i|sed "s/.pdf.gpg/.pdf/;"`;done

Read the fine manpage for security implications of symmetric keys and of passing the passphrase on the command line! Alternatively, use the Gnu-Pg agent, whatever that is.

Tag: geeky