Monday, November 16, 2009, 07:09 PM -
Programming & ComputersPosted by Administrator
Anyone who has used Adobe products for any length of time knows that UI consistency is not one of Adobe's strong points. In fact, for the uninitiated, things have gotten so bad over at Adobe that there is even a blog about it over at
Adobe Gripes and though it seems Flash is the biggest culprit, all of the applications are guilty of some nonsense. Anyone who has scripted Adobe products knows that their UI inconsistency carries over to their APIs as well. I've complained about this in the past
1 and
I'm not the only one to do so, either.
For the first time, I really, really need to script the processing of PDFs because eBooks are popping up freakin' everywhere and vendors want PDFs if I can't give the native format, which I can't (yet and it will be a long while before I can). I'm not asking for a lot of depth here. I just need to compile, optimize, and crop multiple sets of PDFs. This type of work I can set up in other applications, Adobe's included, fairly easily.
None of those basic production commands in Acrobat are available to Applescript, however. It seems that Adobe has decided to abandon further Applescript (without really telling anyone) and focus entirely on Javascript. So, what few Applescript commands that do exist look like they were simply abandoned and clearly not brought to the same implementations of the rest of the Creative Suite. For the Applescript folks they have offered (what I guess is) a laurel leaf, albeit a rotting one with most of the leaves lobbed off:
-- get the title of an open document
tell application "Adobe Acrobat Professional"
do script "this.info.title;"
end tell
"do script". That's it.
So, I can automate Acrobat, but only on its own terms, which are both cheesy and lame. Communication is strictly limited: I can't send data to it, but that doesn't matter because even if I could I can't get data out of it, and it looks as though I'm pretty much forced to debug the code in Acrobat's Javascript debugger.
2At the same time, all of the other Adobe products that matter to me—InDesign, Photoshop, and Illustrator—have very robust, if not feature-complete implementations (though frustratingly inconsistent and/or poorly documented at times). So, why no Applescript support in Acrobat, Adobe, when clearly you care enough about it everywhere else? What is it about Acrobat that sets it so far apart from the rest of the line-up that you felt Applescript was unnecessary, despite the fact that all of the other production-related applications have robust PDF support? It's nonsense like this that makes people want to throw chairs.
The
do script command is nothing more than a crappy cop-out of them not doing their job to the level their price points imply and
Adobe Acrobat is preventing me from me doing my job effectively. I've found alternatives to all of Adobe's apps at home, but unfortunately I'm burdened with Adobe forever at The Day Job and have to suffer the consequences of their poor decision-making (how are those layoffs working out for you guys?).
Even if
do script were actually, you know,
useful, the Javascript implementation still isn't feature-complete even though were are now on version
9 of Acrobat...of course. Why would it be any other way?
It seems I can combine PDFs, and I can crop, but I can't optimize. Ironically, of all the things I need to do that is the single command I need more than anything. Optimizing a PDF is necessary to go from a print PDF to the "web PDF" that all of the vendors ask for and are so much easier to FTP. I can go from 3 GB of PDF to <300 MB, and the process may only take a couple clicks, but it can take hours to run through a large enough book, and it almost entirely consumes a machine in the process. I have literally
thousands of books to go through, and scripting this would save me tens of thousands of dollars each year. It's a perfect job for my automation Mac and it would be a huge win for me. But can I script it? No, because that would be too freakin' logical, and that just reinforces my dislike of Adobe. It seems just when I think I have a solution at my fingertips, they have some reason why I can't do it properly or, in this case, at all.
Essentially, even after all of these years and upgrades, there is no way I can reasonably (comprehensively) integrate Acrobat into my other well-established,
Adobe-centric workflows, and that whole notion is just laughable. Everything is so seemingly well-integrated, yet Acrobat stands alone. I have Applescripts that are
thousands of lines long that save me
countless hours (at least thousands) of manual work each year. In one set of scripts I send calls to Adobe InDesign, Adobe Illustrator, Adobe Photoshop, the Mac OS Finder, and Microsoft Excel all seamlessly working together. The single gaping hole in all of that is Adobe Acrobat, and up until now I was able to work around Acrobat's severe scripting limitations.
But now that eBooks have taken on a whole new priority, and all of the vendors that I work with take PDFs out of convenience, I desperately need to script the processing of PDFs. I don't have a choice here. I have to find a solution. Adobe is, in its own weird way, keeping me from doing my job in a reasonable fashion.
Since I can't do what I want with Adobe's software "out of the box", my last alternative is to call an Adobe rep and see if they have a
server-based solution (ugh, there goes another point of IT independence) that can help move a lot of PDFs in a short period of time. I'm sure this is going to cost
me a whole more than it costs
them to pay one of their programmers to write some code over the course of a week or so and they can just fix this for everybody.
Perhaps that's been their plan all along.
1: Two blog postings come to mind:
An Applescript and Adobe Rant and
Applescripting for Adobe and Kindergarten Scissors: A Study in Object Transformations Across Versions 2: These are assumptions on my part since I haven't actually used this command before. However, the Applescript dictionary entry for
do script only shows this in Script Debugger:
do script (verb)Perform a JavaScript. (from the miscellaneous standards suite)
COMMAND SYNTAX do script unicode text ¬
file alias PARAMETERS direct parameter, optional, unicode text, The actual text of the JavaScript to perform.
file, optional, alias, The file containing the JavaScript to perform.
I don't see any way to send arguments and return values. Do you?