Adobe Acrobat

From The Jolly Contrarian
Jump to navigation Jump to search
The JC pontificates about technology

An occasional series.


Get in touch
Comments? Questions? Suggestions? Requests? Sign up for our newsletter? Questions? We’d love to hear from you.
BREAKING: Get the new weekly newsletter here Old editions here

To anyone who works with words, Adobe Acrobat is an indispensable tool. If you are as obsessed with judging brevity as I am, you will have noticed it has no word count function. You would not think it is beyond the wit of Adobe’s developers to put one in. But no. In a software package that has been around since 1984, they’ve never thought to include a word counter.

But there is a way of natively counting words in Acrobat — not, sadly, the “Reader” version, but it does work in Professional, and sometimes in Standard, depending on your licence. It is the most ludicrous thing you will ever see. Here, for lovers of the fantastically absurd, it is:

STEP ONE: Open your Adobe Acrobat File.

STEP TWO: Launch the JavaScript console.

Now, steady on: do not shriek “IF YOU THINK I’M HAVING ANYTHING TO DO WITH A JAVASCRIPT CONSOLE – WHATEVER THE HELL THAT IS – THINK AGAIN, PAL”. Just do it. Trust me.

Type <ctrl-J> and pop! There it is. It’s called a “Javascript debugger”. Treat yourself to a quick chortle at the double entendre.

STEP THREE: Copy and paste the following text – all of it – into the large box at the bottom of the console window. NOTE - QUOTES MUST BE STRAIGHT NOT CURLY (the JC’s installation of MediaWiki is set to automatically bend them):

var cnt=0;

for (var p = 0; p < this.numPages; p++) cnt += getPageNumWords(p);

console.println("There are " + cnt + " words in this file.");

STEP FOUR: Highlight all the text you just pasted. It is really important you highlight the text, otherwise this will not work.

STEP FIVE: hit <ctrl-Enter>

In the console window, under your text, you will see the following:

“There are n words in this file.”

Now, this will only count every word in the document. It won’t count a single page, selected text or anything useful like that. If you can come up with a more insane way of carrying out an elementary task in a market-leading software package, do write in.