Re: Need help with Adobe Acrobat 8 Professional
Re: Need help with Adobe Acrobat 8 Professional
- Subject: Re: Need help with Adobe Acrobat 8 Professional
- From: Bryan Lockwood <email@hidden>
- Date: Mon, 12 Mar 2007 00:28:07 -0400
- Thread-topic: Need help with Adobe Acrobat 8 Professional
> From: Matt Deatherage <email@hidden>
> Date: Sat, 10 Mar 2007 21:09:19 -0600
> To: Bryan Lockwood <email@hidden>
> Cc: <email@hidden>
> Subject: Re: Need help with Adobe Acrobat 8 Professional
>
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
>
> On 3/10/07 at 7:29 PM, Bryan Lockwood <email@hidden> wrote:
>
>> You can drop JPEG files on the Acrobat app itself and it understands and
>> incorporates them into a new document. Or you can choose "Create PDF"/"From
>> Multiple Files..." and build up a list of files which you can then save.
>>
>> How then do I do this in AppleScript?
>
> You're overthinking it.
>
> - -- theFiles is a list of JPEG files to open, as type alias
>
> tell application "Adobe Acrobat Professional"
> activate
> open theFiles
> end tell
>
> Now, in the "I like overthinking things" department, I don't
> know how to
> keep Acrobat from asking in a modal dialog box if you want to combine
> all of those files into a single document.
Yes, and this is quite the rub. I'm writing a program which uses Acrobat as
a helper program, and I'd like to avoid direct interaction between the user
and Acrobat -- I really want to intermediate. Having Acroabt throw up a
dialog each time I do this is just not going to make it with the user.
I wish I could guess the right "options" argument for the "open" command,
but I haven't done well so far; nor have you, Matt. I agree with you --
Thank you for making this all clear, Adobe! (NOT!)
I even went to the bother of reading the copious Java documentation on
interapplication communication, thinking they might give away some secrets
there;but they mention nothing about open arguments there either. I'm glad
they don't discriminate against us AppleScripters.
I am taking another approach. The question doesn't even come up if you open
an alias list of only one file, as in that case "merging" or "packaging"
yield the same result -- one PDF file with one page in it. With multiple
files, the "merging" option would give you one PDF documtent with n pages in
it, as opposed to "packaging" (I'm using the terms Acrobat uses in its
dialogs) which would give you n PDF documents with each having just one
page.
The approach I'm pursuing at this point is to create a new document , then
go through the list of JPEGS and for each JPEG file create a single-page
document from it with the open command. Then, at the end, go through each of
the documents just read in and take the single page from that document and
put it in the first, summary document using the "insertPages" command. Then
delete the now superfluous documents and save the summary document. A little
more labor-intensive, but this should generate no dialogs.
[ I tried creating new pages with mumblings like "make new page from ....";
but while that in some forms compiled and executed, I don't think it every
actually produced a page, and all it ever returned was null and not a
reference to the new page. So I gave up on this tack. ]
But all of this could have been much easier if I could specify in an open
option that I want merging and then just open the whole list of aliases in
one fell swoop. (whine, whine.)
>
> The "open" verb in Acrobat Pro 8 accepts a string of "options," but
> nowhere in the dictionary or even in Adobe's 80MB Acrobat SDK do they
> bother to define what those options might be or how to use
> them. In
> fact, in the 226-page Acrobat IAC API reference, it's listed as
> "Optional parameter string of open actions."
>
> The text "parameter string" and "open actions" appears *nowhere
> else* in
> the document except in that one line. Thanks for making that clear,
> Adobe!
>
> The SDK is free and available in one piece or as individual parts:
>
> <http://www.adobe.com/devnet/acrobat/>
>
> You'll need an Adobe ID to download it, but they're free.
>
Well, it's some small consolation that I'm not out any money in this matter,
although I wasted hours on such really petty stuff like getting a program to
open a list of just the kind of files it likes without throwing up a dialog.
My take is that this is just more totally unspired documentation which looks
formidable in its breadth but is in fact sadly superficial and quiet in all
the wrong places.
Inasmuch as Adobe went to the trouble of making Acrobat Professional
applescriptable, it seems somewhere in Adobe there should be someone (maybe
the person who wrote the code to handle apple events) who could tell us what
values this invaluable "optional parameter string of open actions" might
possibly take on. I wish I knew how to find that person. I would pick his or
her brains and then write a quick book on it, describing, among other
things, how to open a list of files with the merging option _without_ the
dialog! But of course, if there were such a person, he or she should be on
this list. If we're lucky maybe they are.
Bryan Lockwood
_______________________________________________
Do not post admin requests to the list. They will be ignored.
AppleScript-Users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
Archives: http://lists.apple.com/archives/applescript-users
This email sent to email@hidden