peteg's blog - hacking - 2006 12 19 Adobe

Doing battle with Adobe Reader.

/hacking | Link

Adobe
sicleThis application is just plain broken. It wants to be an operating system: from the look of Version 8 Adobe has tried to shoehorn most of the Mac OS X desktop into their proprietary web-browser-of-sorts. Hmm... perhaps this is what the Windows people have been dealing with all these years. unnecessary, unwanted feature-creep and integration.

The updater is broken. Just download the latest version. Oh wait, you need to get the "Download Manager" to download it for you. Grrr. And you sure do a lot of waiting on all these bloody programs... and then it tries to do the update thing anyway! Screw it, too much trouble.

Now, down to business: the instant-gratification eBook I rashly bought yesterday only lets me print 20 pages of it per month, which seems to me to be a strange compromise between the real world (fair use?) and what's possible with electronic authoritarianism. I found this mechanism is indeed easy to defeat.

A moment's reflection tells you that it is common (UNIX) courtesy for an application to only fiddle with stuff in your home directory, which you (of course) have free access to. (It could do nasty things if it's SUID or using OS DRM services, and that's surely in the post.) The hope is that by swapping some files we can reset the print counter, and that is indeed the case. On Mac OS X, simply, if inconveniently:

  1. Kill Adobe Reader. I assume you haven't used any of your print quota.
  2. Copy your ~/Library/Acrobat User Data somewhere safe. It seems to be a bit sensitive to a few things, so I suggest:
    cd ~/Library
    tar cfv ~/AUD.tar Acrobat\ User\ Data/
    
  3. Fire up Adobe reader, print as much as you're allowed to.
  4. Kill Adobe Reader, save the new state and extract the old:
    cd ~/Library
    mv Acrobat\ User\ Data/ /tmp/AUD.old
    tar xfv ~/AUD.tar
    
  5. Go back to step 3.

If things screw up you can move your saved state back into place and things should work as they did before. The standard disclaimer applies to all of this: it worked for me, I hope it works for you, don't sue me if it doesn't.

I see I'm not the first to think of this.